motoko 2.0.5 → 2.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,40 +0,0 @@
1
- 'use strict';
2
-
3
- const mo = require('../..');
4
-
5
- const actor = `
6
- actor Main {
7
- public func test() : async Nat {
8
- 123
9
- }
10
- }
11
- `;
12
-
13
- describe('virtual file system I/O', () => {
14
- test('write -> read', () => {
15
- const path = 'test__write_read__.txt';
16
- const text = 'A\nB';
17
- mo.write(path, text);
18
- expect(mo.read(path)).toStrictEqual(text);
19
- });
20
- });
21
-
22
- describe('check', () => {
23
- test('works for a basic example', () => {
24
- const path = 'test__check__.mo';
25
- mo.write(path, actor);
26
- expect(mo.check(path)).toStrictEqual([]);
27
- });
28
- });
29
-
30
- describe('run', () => {
31
- test('works for a basic example', () => {
32
- const path = 'test__run__.mo';
33
- mo.write(path, 'let x = 1 + 1; x');
34
- expect(mo.run(path)).toStrictEqual({
35
- result: 0,
36
- stdout: '2 : Nat\n',
37
- stderr: '',
38
- });
39
- });
40
- });
@@ -1,15 +0,0 @@
1
- 'use strict';
2
-
3
- const mo = require('../../interpreter');
4
-
5
- describe('run', () => {
6
- test('works for a basic example', () => {
7
- const path = 'test__run__.mo';
8
- mo.write(path, 'let x = 1 + 1; x');
9
- expect(mo.run(path)).toStrictEqual({
10
- result: 0,
11
- stdout: '2 : Nat\n',
12
- stderr: '',
13
- });
14
- });
15
- });