<commit_before>'use strict';
const assert = require('assert');
const lib = require('../lib');

const config = {
  username: process.env.ZULIP_USERNAME,
  password: <PASSWORD>,
  realm: process.env.ZULIP_REALM
};

console.log("Testing initialization");
console.log("With username & password");

lib(config).then(zulip => {
  assert(zulip.config.apiKey, "Could not initialize API Key");
  console.log("Test passed");
  return zulip.config;
}).then(config => {
  console.log("With API Key");
  return lib(config);
}).then(zulip => zulip.streams.subscriptions()).then(resp => {
    assert(resp.result === 'success', resp.msg);
    console.log("Test passed");
}).catch(err => {
  console.log("Test failed: " + err.message);
});<commit_msg>update initialization test to use streams.subscriptions.retrieve<commit_after>'use strict';
const assert = require('assert');
const lib = require('../lib');

const config = {
  username: process.env.ZULIP_USERNAME,
  password: <PASSWORD>,
  realm: process.env.ZULIP_REALM
};

console.log("Testing initialization");
console.log("With username & password");

lib(config).then(zulip => {
  assert(zulip.config.apiKey, "Could not initialize API Key");
  console.log("Test passed");
  return zulip.config;
}).then(config => {
  console.log("With API Key");
  return lib(config);
}).then(zulip => zulip.streams.subscriptions.retrieve()).then(resp => {
    assert(resp.result === 'success', resp.msg);
    console.log("Test passed");
}).catch(err => {
  console.log("Test failed: " + err.message);
});
{'fraction_non_alphanumeric': 0.18520942408376964, 'fraction_numerical': 0.0, 'mean_word_length': 5.043478260869565, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, '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': '7339916', 'n_tokens_mistral': 493, 'n_tokens_neox': 494, 'n_words': 103}