Fix up docs and incorrect initialization of cloud data manager functions. Add 'spec' unit tests that the cloud data manager functions are actually functions.

This commit is contained in:
Karishma Chadha 2018-10-31 19:20:13 -04:00
parent 1df6743a5f
commit ffef2e92fc
2 changed files with 16 additions and 4 deletions

View file

@ -11,6 +11,13 @@ test('spec', t => {
t.type(Runtime, 'function');
t.type(r, 'object');
// Test types of cloud data managing functions
t.type(r.hasCloudData, 'function');
t.type(r.canAddCloudVariable, 'function');
t.type(r.addCloudVariable, 'function');
t.type(r.removeCloudVariable, 'function');
t.ok(r instanceof Runtime);
t.end();
@ -154,6 +161,7 @@ test('Cloud variable limit allows only 8 cloud variables', t => {
rt.removeCloudVariable();
t.equal(rt.canAddCloudVariable(), true);
rt.addCloudVariable();
t.equal(rt.canAddCloudVariable(), false);
// Disposing of the runtime should reset the cloud variable limitations