forked from microsoft/napajs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.ts
26 lines (22 loc) · 778 Bytes
/
test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
let assert = require('assert');
let helloWorld = require('..');
let napa = require('napajs');
let zone = napa.zone.create('zone');
describe('Test suite for hello-word', function() {
this.timeout(0);
it('prints the string "world"', function() {
let result: string = helloWorld.hello();
assert.equal(result, 'world');
});
it('prints the string "world" in napa zone', function() {
return zone.execute(() => {
let helloWorld = require('..');
let result: string = helloWorld.hello();
return result;
}).then((result : any) => {
assert.equal(result.value, 'world');
});
});
})