forked from alibaba/lowcode-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathonline.test.ts
More file actions
53 lines (45 loc) · 1.25 KB
/
online.test.ts
File metadata and controls
53 lines (45 loc) · 1.25 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { remove } from 'fs-extra';
import parse from '../src';
import { IMaterializeOptions } from '../src/types';
test('materialize react-color by online', async (done) => {
const options: IMaterializeOptions = {
entry: 'react-color@2.19.3',
accesser: 'online',
};
const actual = await parse(options);
expect(actual).toMatchSnapshot();
done();
});
test('materialize mc-hello by online', async (done) => {
const options: IMaterializeOptions = {
entry: 'mc-hello@1.0.1',
accesser: 'online',
};
const actual = await parse(options);
expect(actual).toMatchSnapshot();
done();
});
test('materialize rc-picker by online', async (done) => {
const options: IMaterializeOptions = {
entry: 'rc-picker@2.4.3',
accesser: 'online',
};
const actual = await parse(options);
expect(actual).toMatchSnapshot();
done();
});
test('materialize online rax module by path & specify workDir', async (done) => {
const tempDir = './test/temp';
const options: IMaterializeOptions = {
name: 'rax-view',
version: '2.2.1',
entry: './es/common/index.d.ts',
accesser: 'online',
dslType: 'rax',
tempDir,
};
const actual = await parse(options);
await remove(tempDir);
expect(actual).toMatchSnapshot();
done();
});