UNPKG

1.34 kBJavaScriptView Raw
1
2import { info } from './fsw-info';
3import { sample } from './fsw-sample';
4
5it('should return an object of information about a sign', () => {
6 expect(info("AS14c20S27106M518x529S14c20481x471S27106503x489")).toEqual({
7 minX: 481,
8 minY: 471,
9 width: 37,
10 height: 58,
11 zoom: 1,
12 padding: 0,
13 segment: 'sign',
14 lane: 0
15 });
16 expect(info("AS14c20S27106L518x529S14c20481x471S27106503x489-Z2")).toEqual({
17 minX: 481,
18 minY: 471,
19 width: 37,
20 height: 58,
21 zoom: 2,
22 padding: 0,
23 segment: 'sign',
24 lane: -1
25 });
26 expect(info("AS14c20S27106R518x529S14c20481x471S27106503x489-P10Z0.2")).toEqual({
27 minX: 481,
28 minY: 471,
29 width: 37,
30 height: 58,
31 zoom: .2,
32 padding: 10,
33 segment: 'sign',
34 lane: 1
35 });
36})
37
38it('should return an object of information about a punctuation', () => {
39 expect(info("S38800464x496")).toEqual({
40 minX: 464,
41 minY: 496,
42 width: 72,
43 height: 8,
44 zoom: 1,
45 padding: 0,
46 segment: 'symbol',
47 lane: 0
48 });
49})
50
51it('should return an object of information about a punctuation', () => {
52 expect(info("S38800464x496-P10Z2.2")).toEqual({
53 minX: 464,
54 minY: 496,
55 width: 72,
56 height: 8,
57 zoom: 2.2,
58 padding: 10,
59 segment: 'symbol',
60 lane: 0
61 });
62})