-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathstructure.test.ts
More file actions
28 lines (25 loc) · 866 Bytes
/
structure.test.ts
File metadata and controls
28 lines (25 loc) · 866 Bytes
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
import { process } from '../../../../src/project/behavior-pack/structure/process';
describe('Structure', () => {
const data: { uri: string; result: string }[] = [
{
uri: 'F:\\Temp2\\world\\behavior_packs\\EW-BP\\structures\\empty\\air_1.mcstructure',
result: 'empty:air_1',
},
{
uri: 'F:/Temp2/world/behavior_packs/EW-BP/structures/empty/air_1.mcstructure',
result: 'empty:air_1',
},
{
uri: 'F:/Temp2/world/behavior_packs/EW-BP/structures/empty/temp/air_1.mcstructure',
result: 'empty:temp/air_1',
},
{
uri: 'F:/Temp2/world/behavior_packs/EW-BP/structures/house.mcstructure',
result: 'mystructure:house',
},
];
test.each(data)('$result from $uri', (item) => {
const out = process({ uri: item.uri, getText: () => '//example' });
expect(out).toMatchSnapshot();
});
});