<commit_before>/**
 * This is the Jasmine testing file for the ClearBlade javascript API
 *
 * The credentials to log into the platform and change the collections that this test suite uses:
 *
 * username: <EMAIL>
 * password: <PASSWORD>
 */

var TEST_TIMEOUT = 30000;
var RTP_INFO = {
  serverAddress: "https://rtp.clearblade.com",
  messagingURI: "rtp.clearblade.com",
  messagingPort: 8904,
  noAuthsystemKey: "8cc896b40a82d0d2b4e18bbbed0f",
  noAuthsystemSecret: "8CC896B40A90DEA898C197B5E357",
  safariNoAuthCollection: "ccc896b40ae083ea8af480d4868401",
  chromeNoAuthCollection: "e8c896b40a90bfcd9bc78df5ca5d",
  generalNoAuthCollection: "<KEY>",
  firefoxNoAuthCollection: "a8c996b40aacdd919dadce92c430",
  systemKey: "<KEY>",
  systemSecret: "<KEY>",
  safariCollection: "84d196b40aa883bec8cfdaf697df01",
  firefoxCollection: "9ed196b40a8083efa485e58aa9b901",
  generalCollection: "9cd296b40acac5e2f797a485ec8e01",
  chromeCollection: "bcd196b40ade8ddb9491b494fd9f01"
};
var STAGING_INFO = { 
  serverAddress: "https://staging.clearblade.com",
  messagingURI: "staging.clearblade.com",
  messagingPort: 8904,
  noAuthsystemKey: "<KEY>",
  noAuthsystemSecret: "<KEY>",
  safariNoAuthCollection: "<KEY>",
  chromeNoAuthCollection: "aea2c1ba0a8495d2bdb7d0e3bca701",
  generalNoAuthCollection: "<KEY>",
  firefoxNoAuthCollection: "<KEY>",
  systemKey: "8c9ac1ba0adeb7f68fced7fb9049",
  systemSecret: "8C9AC1BA0AE2D697A0DCA78DC179",
  safariCollection: "d49dc1ba0a8ae8dfb5b5f6a996c301",
  firefoxCollection: "fe9bc1ba0af08893def9f9fceeef01",
  generalCollection: "b49cc1ba0adac69fc9f4d8a0fe52",
  chromeCollection: "d69ac1ba0a9293bbc9fdb486e38d01"
};
var PLATFORM_INFO = {
  serverAddress: "https://platform.clearblade.com",
  messagingURI: "platform.clearblade.com",
  systemKey: '<KEY>',
  systemSecret: '<KEY>',
  noAuthsystemKey: "<KEY>",
  noAuthsystemSecret: "<KEY>",
  safariCollection: "82f7f8aa0ab8929ab1c3cad7e534",
  chromeCollection:"84f6f8aa0abcf9fbb6ae97a6c9da01",
  firefoxCollection:"d8f6f8aa0ababdbbc5b8fdf49356",
  generalCollection:'90f6f8aa0a86969ced80c0a8b03e',
  firefoxNoAuthCollection: "f28fbbb10a8ca5a5f2f5acd297cc01",
  safariNoAuthCollection: "a690bbb10abadbb387efdcc0b09e01",
  generalNoAuthCollection: "ba90bbb10aba93f7bde8cbd2cfe201",
  chromeNoAuthCollection: "e08fbbb10ae0efadd4e2f68cf39701"
};
var TargetPlatform = RTP_INFO;

describe("ClearBlade API", function () {
  it("should return the correct API version", function () {
    var APIversion = ClearBlade.getApiVersion();
    expect(APIversion).toEqual('0.0.2');
  });
});

describe("ClearBlade initialization should", function () {
  beforeEach(function () {
    var isClearBladeInit = false;
    var initOptions = {
      systemKey: TargetPlatform.noAuthsystemKey,
      systemSecret: TargetPlatform.noAuthsystemSecret,
      URI: TargetPlatform.serverAddress,
      messagingURI: TargetPlatform.messagingURI,
      callback: function(err, user) {
        expect(err).toEqual(false);
        isClearBladeInit = true;
      }
    };
    ClearBlade.init(initOptions);
    waitsFor(function() {<commit_msg>change default test target<commit_after>/**
 * This is the Jasmine testing file for the ClearBlade javascript API
 *
 * The credentials to log into the platform and change the collections that this test suite uses:
 *
 * username: <EMAIL>
 * password: <PASSWORD>
 */

var TEST_TIMEOUT = 30000;
var RTP_INFO = {
  serverAddress: "https://rtp.clearblade.com",
  messagingURI: "rtp.clearblade.com",
  messagingPort: 8904,
  noAuthsystemKey: "8cc896b40a82d0d2b4e18bbbed0f",
  noAuthsystemSecret: "8CC896B40A90DEA898C197B5E357",
  safariNoAuthCollection: "ccc896b40ae083ea8af480d4868401",
  chromeNoAuthCollection: "e8c896b40a90bfcd9bc78df5ca5d",
  generalNoAuthCollection: "<KEY>",
  firefoxNoAuthCollection: "a8c996b40aacdd919dadce92c430",
  systemKey: "<KEY>",
  systemSecret: "<KEY>",
  safariCollection: "84d196b40aa883bec8cfdaf697df01",
  firefoxCollection: "9ed196b40a8083efa485e58aa9b901",
  generalCollection: "9cd296b40acac5e2f797a485ec8e01",
  chromeCollection: "<KEY>"
};
var STAGING_INFO = { 
  serverAddress: "https://staging.clearblade.com",
  messagingURI: "staging.clearblade.com",
  messagingPort: 8904,
  noAuthsystemKey: "<KEY>",
  noAuthsystemSecret: "<KEY>",
  safariNoAuthCollection: "bea3c1ba0ae8cc97f2d0e897e6cb01",
  chromeNoAuthCollection: "aea2c1ba0a8495d2bdb7d0e3bca701",
  generalNoAuthCollection: "90a3c1ba0ab2e3dcfccab5d8bbb101",
  firefoxNoAuthCollection: "dca2c1ba0aa0ecd89bbe80ba8b8501",
  systemKey: "8c9ac1ba0adeb7f68fced7fb9049",
  systemSecret: "8C9AC1BA0AE2D697A0DCA78DC179",
  safariCollection: "d49dc1ba0a8ae8dfb5b5f6a996c301",
  firefoxCollection: "fe9bc1ba0af08893def9f9fceeef01",
  generalCollection: "b49cc1ba0adac69fc9f4d8a0fe52",
  chromeCollection: "d69ac1ba0a9293bbc9fdb486e38d01"
};
var PLATFORM_INFO = {
  serverAddress: "https://platform.clearblade.com",
  messagingURI: "platform.clearblade.com",
  systemKey: '<KEY>',
  systemSecret: '<KEY>',
  noAuthsystemKey: "<KEY>",
  noAuthsystemSecret: "<KEY>",
  safariCollection: "82f7f8aa0ab8929ab1c3cad7e534",
  chromeCollection:"84f6f8aa0abcf9fbb6ae97a6c9da01",
  firefoxCollection:"d8f6f8aa0ababdbbc5b8fdf49356",
  generalCollection:'90f6f8aa0a86969ced80c0a8b03e',
  firefoxNoAuthCollection: "f28fbbb10a8ca5a5f2f5acd297cc01",
  safariNoAuthCollection: "a690bbb10abadbb387efdcc0b09e01",
  generalNoAuthCollection: "ba90bbb10aba93f7bde8cbd2cfe201",
  chromeNoAuthCollection: "e08fbbb10ae0efadd4e2f68cf39701"
};
var TargetPlatform = PLATFORM_INFO;

describe("ClearBlade API", function () {
  it("should return the correct API version", function () {
    var APIversion = ClearBlade.getApiVersion();
    expect(APIversion).toEqual('0.0.2');
  });
});

describe("ClearBlade initialization should", function () {
  beforeEach(function () {
    var isClearBladeInit = false;
    var initOptions = {
      systemKey: TargetPlatform.noAuthsystemKey,
      systemSecret: TargetPlatform.noAuthsystemSecret,
      URI: TargetPlatform.serverAddress,
      messagingURI: TargetPlatform.messagingURI,
      callback: function(err, user) {
        expect(err).toEqual(false);
        isClearBladeInit = true;
      }
    };
    ClearBlade.init(initOptions);
    waitsFor(function() {
{'fraction_non_alphanumeric': 0.10706295941195271, 'fraction_numerical': 0.12032598274209012, 'mean_word_length': 6.415876777251185, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2449915', 'n_tokens_mistral': 2757, 'n_tokens_neox': 2434, 'n_words': 341}