-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.js
34 lines (28 loc) · 983 Bytes
/
tests.js
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
27
28
29
30
31
32
33
34
import { Tinytest } from 'meteor/tinytest';
import yaml, { name as packageName } from 'meteor/qnipp:yaml';
import yamlContent from './test.yaml';
import ymlContent from './test.yml';
Tinytest.add('yaml - packageName', (test) => {
test.equal(packageName, 'yaml');
});
Tinytest.add('yaml - import yaml', (test) => {
test.equal(yamlContent, {
number: 3.4,
string: 'A long string',
stringWithQuotes: 'This is also a valid string',
array: ['first line', 'second line', 'third line'],
object: { firstKey: 'first value', secondKey: 'second value' },
});
});
Tinytest.add('yaml - import yml', (test) => {
test.equal(ymlContent, {
number: 3.4,
string: 'A long string',
stringWithQuotes: 'This is also a valid string',
array: ['first line', 'second line', 'third line'],
object: { firstKey: 'first value', secondKey: 'second value' },
});
});
Tinytest.add('yaml - default export', (test) => {
test.instanceOf(yaml.load, Function);
});