jssm 5.35.4 → 5.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/.codeclimate.yml +22 -22
  2. package/.editorconfig +12 -12
  3. package/.eslintrc +20 -20
  4. package/.nycrc +6 -6
  5. package/.travis.yml +8 -8
  6. package/LICENSE.md +21 -21
  7. package/README.md +997 -993
  8. package/dist/es6/jssm-dot.d.ts +6 -6
  9. package/dist/es6/jssm-dot.js +1 -1
  10. package/dist/es6/jssm.d.ts +100 -100
  11. package/dist/es6/jssm.js +792 -792
  12. package/dist/es6/jssm_types.d.ts +151 -151
  13. package/dist/es6/jssm_types.js +1 -1
  14. package/dist/es6/jssm_util.d.ts +8 -8
  15. package/dist/es6/jssm_util.js +34 -34
  16. package/dist/es6/version.d.ts +2 -2
  17. package/dist/es6/version.js +2 -2
  18. package/dist/jssm.es5.cjs.js +1 -1
  19. package/dist/jssm.es5.iife.js +1 -0
  20. package/jest-spec.config.js +27 -27
  21. package/jest-stoch.config.js +27 -27
  22. package/jssm-dot.d.ts +6 -6
  23. package/jssm.d.ts +100 -100
  24. package/jssm_types.d.ts +151 -151
  25. package/jssm_util.d.ts +8 -8
  26. package/package.json +125 -122
  27. package/rollup.config.iife.js +44 -44
  28. package/rollup.config.js +44 -44
  29. package/src/demo/index.html +38 -38
  30. package/src/demo/style.css +1 -1
  31. package/src/ts/jssm-dot.peg +928 -874
  32. package/src/ts/jssm.ts +1120 -1120
  33. package/src/ts/jssm_types.ts +346 -346
  34. package/src/ts/jssm_util.ts +100 -100
  35. package/src/ts/tests/actions.spec.ts +167 -167
  36. package/src/ts/tests/arrange.spec.ts +72 -72
  37. package/src/ts/tests/arrange.stoch.ts +4 -4
  38. package/src/ts/tests/array_box_if_string.spec.ts +30 -31
  39. package/src/ts/tests/array_transitions.spec.ts +129 -129
  40. package/src/ts/tests/arrow unicode.spec.ts +88 -88
  41. package/src/ts/tests/arrow.spec.ts +124 -124
  42. package/src/ts/tests/colors.spec.ts +58 -58
  43. package/src/ts/tests/comment.spec.ts +134 -134
  44. package/src/ts/tests/compile.spec.ts +79 -79
  45. package/src/ts/tests/constants.spec.ts +98 -98
  46. package/src/ts/tests/cycles.spec.ts +153 -153
  47. package/src/ts/tests/dot_preamble.spec.ts +16 -16
  48. package/src/ts/tests/embedded_sm.spec.ts +36 -36
  49. package/src/ts/tests/flow.spec.ts +22 -22
  50. package/src/ts/tests/forced transitions.spec.ts +26 -26
  51. package/src/ts/tests/general.spec.ts +933 -933
  52. package/src/ts/tests/graph node lists.spec.ts +21 -21
  53. package/src/ts/tests/histo.spec.ts +24 -24
  54. package/src/ts/tests/hooks.spec.ts +28 -0
  55. package/src/ts/tests/language.spec.ts +37 -37
  56. package/src/ts/tests/language_data/belarussian.json +13 -13
  57. package/src/ts/tests/language_data/bengali.json +15 -15
  58. package/src/ts/tests/language_data/emoji.json +21 -21
  59. package/src/ts/tests/language_data/english.json +16 -16
  60. package/src/ts/tests/language_data/french.json +16 -16
  61. package/src/ts/tests/language_data/german.json +16 -16
  62. package/src/ts/tests/language_data/hebrew.json +16 -16
  63. package/src/ts/tests/language_data/portuguese.json +12 -12
  64. package/src/ts/tests/language_data/russian.json +12 -12
  65. package/src/ts/tests/language_data/spanish.json +17 -17
  66. package/src/ts/tests/language_data/ukrainian.json +18 -18
  67. package/src/ts/tests/layout.spec.ts +29 -29
  68. package/src/ts/tests/machine_attributes.spec.ts +398 -398
  69. package/src/ts/tests/machine_name.spec.ts +14 -14
  70. package/src/ts/tests/named lists.spec.ts +24 -19
  71. package/src/ts/tests/nominated states.spec.ts +133 -133
  72. package/src/ts/tests/parse actions.spec.ts +32 -32
  73. package/src/ts/tests/parse.spec.ts +94 -94
  74. package/src/ts/tests/probability.spec.ts +146 -146
  75. package/src/ts/tests/r639.spec.ts +27 -27
  76. package/src/ts/tests/sample_select.spec.ts +173 -173
  77. package/src/ts/tests/seq.spec.ts +14 -16
  78. package/src/ts/tests/seq.stoch.ts +83 -0
  79. package/src/ts/tests/shapes.spec.ts +63 -63
  80. package/src/ts/tests/sm_tag.spec.ts +37 -37
  81. package/src/ts/tests/special characters.spec.ts +39 -39
  82. package/src/ts/tests/state_declaration.spec.ts +214 -200
  83. package/src/ts/tests/state_style.spec.ts +82 -39
  84. package/src/ts/tests/stop light.spec.ts +157 -157
  85. package/src/ts/tests/stripes.spec.ts +52 -52
  86. package/src/ts/tests/theme.spec.ts +45 -45
  87. package/src/ts/tests/weighted_histo_key.spec.ts +22 -22
  88. package/src/ts/tests/weighted_rand_select.spec.ts +27 -27
  89. package/src/ts/tests/weighted_sample_select.spec.ts +24 -26
  90. package/src/ts/version.ts +1 -1
  91. package/tree.txt +1794 -1794
  92. package/tsconfig.json +27 -27
  93. package/version.d.ts +2 -2
@@ -1,4 +1,4 @@
1
-
2
- // import { sm } from '../jssm';
3
-
4
- test('TODO placeholder', () => { expect(1).toBe(1); });
1
+
2
+ // import { sm } from '../jssm';
3
+
4
+ test('TODO placeholder', () => { expect(1).toBe(1); });
@@ -1,31 +1,30 @@
1
-
2
- import { array_box_if_string } from '../jssm_util';
3
-
4
-
5
-
6
-
7
-
8
- const testData = [
9
- [ 0, 0 ],
10
- [ true, true ],
11
- [ "a", ["a"] ],
12
- [ ["a"], ["a"] ],
13
- [ [], [] ],
14
- [ undefined, undefined ]
15
- ];
16
-
17
-
18
-
19
-
20
-
21
- describe('array_box_if_string/1', () => {
22
-
23
- testData.map( ([src, dest]) =>
24
- test(`${JSON.stringify(src)} generates ${JSON.stringify(dest)}`, () =>
25
- expect( array_box_if_string(src) )
26
- .toEqual(dest) ) );
27
-
28
-
29
- });
30
-
31
- // stochable
1
+
2
+ import { array_box_if_string } from '../jssm_util';
3
+
4
+
5
+
6
+
7
+
8
+ const testData = [
9
+ [ 0, 0 ],
10
+ [ true, true ],
11
+ [ "a", ["a"] ],
12
+ [ ["a"], ["a"] ],
13
+ [ [], [] ],
14
+ [ undefined, undefined ]
15
+ ];
16
+
17
+
18
+
19
+
20
+
21
+ describe('array_box_if_string/1', () => {
22
+
23
+ testData.map( ([src, dest]) =>
24
+ test(`${JSON.stringify(src)} generates ${JSON.stringify(dest)}`, () =>
25
+ expect( array_box_if_string(src) )
26
+ .toEqual(dest) ) );
27
+
28
+ });
29
+
30
+ // stochable
@@ -1,129 +1,129 @@
1
-
2
- /* eslint-disable max-len */
3
-
4
- import * as jssm from '../jssm';
5
-
6
-
7
-
8
-
9
-
10
- describe('Array basics', () => {
11
-
12
-
13
-
14
- describe('array of one', () => {
15
-
16
- const aLeft = [
17
- {main_path: false,forced_only: false,"from":"a","to":"d","kind":"legal"}
18
- ];
19
-
20
- test('[a]->d;', () => expect( jssm.compile(jssm.parse('[a]->d;')).transitions ).toEqual(aLeft) );
21
-
22
- });
23
-
24
-
25
-
26
- describe('array of one', () => {
27
-
28
- const aLeft = [
29
- {main_path: false,forced_only: false,"from":"a","to":"d","kind":"legal"}
30
- ];
31
-
32
- test('[a]->d;', () => expect( jssm.compile(jssm.parse('[a]->d;')).transitions ).toEqual(aLeft) );
33
-
34
- });
35
-
36
-
37
-
38
- });
39
-
40
-
41
-
42
-
43
-
44
- describe('Array sides', () => {
45
-
46
-
47
-
48
- describe('array on left', () => {
49
-
50
- const aLeft = [
51
- {main_path: false,forced_only: false,"from":"a","to":"d","kind":"legal"},
52
- {main_path: false,forced_only: false,"from":"b","to":"d","kind":"legal"},
53
- {main_path: false,forced_only: false,"from":"c","to":"d","kind":"legal"}
54
- ];
55
-
56
- test('[a b c]->d;', () => expect( jssm.compile(jssm.parse('[a b c]->d;')).transitions ).toEqual(aLeft) );
57
-
58
- });
59
-
60
-
61
-
62
- describe('array on right', () => {
63
-
64
- const aRight = [
65
- {main_path: false,forced_only: false,"from":"a","to":"b","kind":"legal"},
66
- {main_path: false,forced_only: false,"from":"a","to":"c","kind":"legal"},
67
- {main_path: false,forced_only: false,"from":"a","to":"d","kind":"legal"}
68
- ];
69
-
70
- test('a->[b c d];', () => expect( jssm.compile(jssm.parse('a->[b c d];')).transitions ).toEqual(aRight) );
71
-
72
- });
73
-
74
-
75
-
76
- describe('array on both sides', () => {
77
-
78
- const aBoth = [
79
- {main_path: false,forced_only: false,"from":"a","to":"x","kind":"legal"},
80
- {main_path: false,forced_only: false,"from":"a","to":"y","kind":"legal"},
81
- {main_path: false,forced_only: false,"from":"a","to":"z","kind":"legal"},
82
- {main_path: false,forced_only: false,"from":"b","to":"x","kind":"legal"},
83
- {main_path: false,forced_only: false,"from":"b","to":"y","kind":"legal"},
84
- {main_path: false,forced_only: false,"from":"b","to":"z","kind":"legal"},
85
- {main_path: false,forced_only: false,"from":"c","to":"x","kind":"legal"},
86
- {main_path: false,forced_only: false,"from":"c","to":"y","kind":"legal"},
87
- {main_path: false,forced_only: false,"from":"c","to":"z","kind":"legal"}
88
- ];
89
-
90
- test('[a b c]->[x y z];', () => expect( jssm.compile(jssm.parse('[a b c]->[x y z];')).transitions ).toEqual(aBoth) );
91
-
92
- });
93
-
94
-
95
-
96
- describe('array in middle', () => {
97
-
98
- const aBoth = [
99
- {main_path: false,forced_only: false,"from":"a","to":"x","kind":"legal"},
100
- {main_path: false,forced_only: false,"from":"a","to":"y","kind":"legal"},
101
- {main_path: false,forced_only: false,"from":"a","to":"z","kind":"legal"},
102
- {main_path: false,forced_only: false,"from":"x","to":"b","kind":"legal"},
103
- {main_path: false,forced_only: false,"from":"y","to":"b","kind":"legal"},
104
- {main_path: false,forced_only: false,"from":"z","to":"b","kind":"legal"}
105
- ];
106
-
107
- test('a->[x y z]->b;', () => expect( jssm.compile(jssm.parse('a->[x y z]->b;')).transitions ).toEqual(aBoth) );
108
-
109
- });
110
-
111
-
112
-
113
- });
114
-
115
-
116
-
117
-
118
-
119
- describe('array of zero must throw', () => {
120
-
121
- const aLeft = [];
122
-
123
- test('On left []->d;', () => expect( () => jssm.compile( jssm.parse('[]->d;') ).transitions ).toThrow() );
124
- test('On right d->[];', () => expect( () => jssm.compile( jssm.parse('d->[];') ).transitions ).toThrow() );
125
- test('On both []->[];', () => expect( () => jssm.compile( jssm.parse('[]->[];') ).transitions ).toThrow() );
126
- test('In middle d->[]->e;', () => expect( () => jssm.compile( jssm.parse('d->[]->e;') ).transitions ).toThrow() );
127
- test('In loop d->[]->d;', () => expect( () => jssm.compile( jssm.parse('d->[]->d;') ).transitions ).toThrow() );
128
-
129
- });
1
+
2
+ /* eslint-disable max-len */
3
+
4
+ import * as jssm from '../jssm';
5
+
6
+
7
+
8
+
9
+
10
+ describe('Array basics', () => {
11
+
12
+
13
+
14
+ describe('array of one', () => {
15
+
16
+ const aLeft = [
17
+ {main_path: false,forced_only: false,"from":"a","to":"d","kind":"legal"}
18
+ ];
19
+
20
+ test('[a]->d;', () => expect( jssm.compile(jssm.parse('[a]->d;')).transitions ).toEqual(aLeft) );
21
+
22
+ });
23
+
24
+
25
+
26
+ describe('array of one', () => {
27
+
28
+ const aLeft = [
29
+ {main_path: false,forced_only: false,"from":"a","to":"d","kind":"legal"}
30
+ ];
31
+
32
+ test('[a]->d;', () => expect( jssm.compile(jssm.parse('[a]->d;')).transitions ).toEqual(aLeft) );
33
+
34
+ });
35
+
36
+
37
+
38
+ });
39
+
40
+
41
+
42
+
43
+
44
+ describe('Array sides', () => {
45
+
46
+
47
+
48
+ describe('array on left', () => {
49
+
50
+ const aLeft = [
51
+ {main_path: false,forced_only: false,"from":"a","to":"d","kind":"legal"},
52
+ {main_path: false,forced_only: false,"from":"b","to":"d","kind":"legal"},
53
+ {main_path: false,forced_only: false,"from":"c","to":"d","kind":"legal"}
54
+ ];
55
+
56
+ test('[a b c]->d;', () => expect( jssm.compile(jssm.parse('[a b c]->d;')).transitions ).toEqual(aLeft) );
57
+
58
+ });
59
+
60
+
61
+
62
+ describe('array on right', () => {
63
+
64
+ const aRight = [
65
+ {main_path: false,forced_only: false,"from":"a","to":"b","kind":"legal"},
66
+ {main_path: false,forced_only: false,"from":"a","to":"c","kind":"legal"},
67
+ {main_path: false,forced_only: false,"from":"a","to":"d","kind":"legal"}
68
+ ];
69
+
70
+ test('a->[b c d];', () => expect( jssm.compile(jssm.parse('a->[b c d];')).transitions ).toEqual(aRight) );
71
+
72
+ });
73
+
74
+
75
+
76
+ describe('array on both sides', () => {
77
+
78
+ const aBoth = [
79
+ {main_path: false,forced_only: false,"from":"a","to":"x","kind":"legal"},
80
+ {main_path: false,forced_only: false,"from":"a","to":"y","kind":"legal"},
81
+ {main_path: false,forced_only: false,"from":"a","to":"z","kind":"legal"},
82
+ {main_path: false,forced_only: false,"from":"b","to":"x","kind":"legal"},
83
+ {main_path: false,forced_only: false,"from":"b","to":"y","kind":"legal"},
84
+ {main_path: false,forced_only: false,"from":"b","to":"z","kind":"legal"},
85
+ {main_path: false,forced_only: false,"from":"c","to":"x","kind":"legal"},
86
+ {main_path: false,forced_only: false,"from":"c","to":"y","kind":"legal"},
87
+ {main_path: false,forced_only: false,"from":"c","to":"z","kind":"legal"}
88
+ ];
89
+
90
+ test('[a b c]->[x y z];', () => expect( jssm.compile(jssm.parse('[a b c]->[x y z];')).transitions ).toEqual(aBoth) );
91
+
92
+ });
93
+
94
+
95
+
96
+ describe('array in middle', () => {
97
+
98
+ const aBoth = [
99
+ {main_path: false,forced_only: false,"from":"a","to":"x","kind":"legal"},
100
+ {main_path: false,forced_only: false,"from":"a","to":"y","kind":"legal"},
101
+ {main_path: false,forced_only: false,"from":"a","to":"z","kind":"legal"},
102
+ {main_path: false,forced_only: false,"from":"x","to":"b","kind":"legal"},
103
+ {main_path: false,forced_only: false,"from":"y","to":"b","kind":"legal"},
104
+ {main_path: false,forced_only: false,"from":"z","to":"b","kind":"legal"}
105
+ ];
106
+
107
+ test('a->[x y z]->b;', () => expect( jssm.compile(jssm.parse('a->[x y z]->b;')).transitions ).toEqual(aBoth) );
108
+
109
+ });
110
+
111
+
112
+
113
+ });
114
+
115
+
116
+
117
+
118
+
119
+ describe('array of zero must throw', () => {
120
+
121
+ const aLeft = [];
122
+
123
+ test('On left []->d;', () => expect( () => jssm.compile( jssm.parse('[]->d;') ).transitions ).toThrow() );
124
+ test('On right d->[];', () => expect( () => jssm.compile( jssm.parse('d->[];') ).transitions ).toThrow() );
125
+ test('On both []->[];', () => expect( () => jssm.compile( jssm.parse('[]->[];') ).transitions ).toThrow() );
126
+ test('In middle d->[]->e;', () => expect( () => jssm.compile( jssm.parse('d->[]->e;') ).transitions ).toThrow() );
127
+ test('In loop d->[]->d;', () => expect( () => jssm.compile( jssm.parse('d->[]->d;') ).transitions ).toThrow() );
128
+
129
+ });
@@ -1,88 +1,88 @@
1
- /* eslint-disable max-len */
2
-
3
- import * as jssm from '../jssm';
4
-
5
-
6
-
7
-
8
-
9
- test.todo('Re-enable the unicode arrow blocks once we work that into the machine');
10
-
11
- // describe('arrow_direction', () => {
12
-
13
- // test('verify ←', () => expect(jssm.arrow_direction('←')).toBe('left'));
14
- // test('verify ⇐', () => expect(jssm.arrow_direction('⇐')).toBe('left'));
15
- // test('verify ↚', () => expect(jssm.arrow_direction('↚')).toBe('left'));
16
-
17
- // test('verify →', () => expect(jssm.arrow_direction('→')).toBe('right'));
18
- // test('verify ⇒', () => expect(jssm.arrow_direction('⇒')).toBe('right'));
19
- // test('verify ↛', () => expect(jssm.arrow_direction('↛')).toBe('right'));
20
-
21
- // test('verify ↔', () => expect(jssm.arrow_direction('↔')).toBe('both'));
22
- // test('verify ⇔', () => expect(jssm.arrow_direction('⇔')).toBe('both'));
23
- // test('verify ↮', () => expect(jssm.arrow_direction('↮')).toBe('both'));
24
-
25
- // test('verify ←⇒', () => expect(jssm.arrow_direction('←⇒')).toBe('both'));
26
- // test('verify ⇐→', () => expect(jssm.arrow_direction('⇐→')).toBe('both'));
27
- // test('verify ←↛', () => expect(jssm.arrow_direction('←↛')).toBe('both'));
28
- // test('verify ↚→', () => expect(jssm.arrow_direction('↚→')).toBe('both'));
29
- // test('verify ⇐↛', () => expect(jssm.arrow_direction('⇐↛')).toBe('both'));
30
- // test('verify ↚⇒', () => expect(jssm.arrow_direction('↚⇒')).toBe('both'));
31
-
32
- // });
33
-
34
-
35
-
36
-
37
-
38
- // describe('arrow_left_kind', () => {
39
-
40
- // test('verify →', () => expect(jssm.arrow_left_kind('→')).toBe('none'));
41
- // test('verify ⇒', () => expect(jssm.arrow_left_kind('⇒')).toBe('none'));
42
- // test('verify ↛', () => expect(jssm.arrow_left_kind('↛')).toBe('none'));
43
-
44
- // test('verify ←', () => expect(jssm.arrow_left_kind('←')).toBe('legal'));
45
- // test('verify ↔', () => expect(jssm.arrow_left_kind('↔')).toBe('legal'));
46
- // test('verify ←⇒', () => expect(jssm.arrow_left_kind('←⇒')).toBe('legal'));
47
- // test('verify ←↛', () => expect(jssm.arrow_left_kind('←↛')).toBe('legal'));
48
-
49
- // test('verify ⇐', () => expect(jssm.arrow_left_kind('⇐')).toBe('main'));
50
- // test('verify ⇔', () => expect(jssm.arrow_left_kind('⇔')).toBe('main'));
51
- // test('verify ⇐→', () => expect(jssm.arrow_left_kind('⇐→')).toBe('main'));
52
- // test('verify ⇐↛', () => expect(jssm.arrow_left_kind('⇐↛')).toBe('main'));
53
-
54
- // test('verify ↚', () => expect(jssm.arrow_left_kind('↚')).toBe('forced'));
55
- // test('verify ↮', () => expect(jssm.arrow_left_kind('↮')).toBe('forced'));
56
- // test('verify ↚→', () => expect(jssm.arrow_left_kind('↚→')).toBe('forced'));
57
- // test('verify ↚⇒', () => expect(jssm.arrow_left_kind('↚⇒')).toBe('forced'));
58
-
59
- // });
60
-
61
-
62
-
63
-
64
-
65
- // describe('arrow_right_kind', () => {
66
-
67
- // test('verify ←', () => expect(jssm.arrow_right_kind('←')).toBe('none'));
68
- // test('verify ⇐', () => expect(jssm.arrow_right_kind('⇐')).toBe('none'));
69
- // test('verify ↚', () => expect(jssm.arrow_right_kind('↚')).toBe('none'));
70
-
71
- // test('verify →', () => expect(jssm.arrow_right_kind('→')).toBe('legal'));
72
- // test('verify ↔', () => expect(jssm.arrow_right_kind('↔')).toBe('legal'));
73
- // test('verify ⇐→', () => expect(jssm.arrow_right_kind('⇐→')).toBe('legal'));
74
- // test('verify ↚→', () => expect(jssm.arrow_right_kind('↚→')).toBe('legal'));
75
-
76
- // test('verify ⇒', () => expect(jssm.arrow_right_kind('⇒')).toBe('main'));
77
- // test('verify ⇔', () => expect(jssm.arrow_right_kind('⇔')).toBe('main'));
78
- // test('verify ←⇒', () => expect(jssm.arrow_right_kind('←⇒')).toBe('main'));
79
- // test('verify ↚⇒', () => expect(jssm.arrow_right_kind('↚⇒')).toBe('main'));
80
-
81
- // test('verify ↛', () => expect(jssm.arrow_right_kind('↛')).toBe('forced'));
82
- // test('verify ↮', () => expect(jssm.arrow_right_kind('↮')).toBe('forced'));
83
- // test('verify ←↛', () => expect(jssm.arrow_right_kind('←↛')).toBe('forced'));
84
- // test('verify ⇐↛', () => expect(jssm.arrow_right_kind('⇐↛')).toBe('forced'));
85
-
86
- // });
87
-
88
- // // stochable
1
+ /* eslint-disable max-len */
2
+
3
+ import * as jssm from '../jssm';
4
+
5
+
6
+
7
+
8
+
9
+ test.todo('Re-enable the unicode arrow blocks once we work that into the machine');
10
+
11
+ // describe('arrow_direction', () => {
12
+
13
+ // test('verify ←', () => expect(jssm.arrow_direction('←')).toBe('left'));
14
+ // test('verify ⇐', () => expect(jssm.arrow_direction('⇐')).toBe('left'));
15
+ // test('verify ↚', () => expect(jssm.arrow_direction('↚')).toBe('left'));
16
+
17
+ // test('verify →', () => expect(jssm.arrow_direction('→')).toBe('right'));
18
+ // test('verify ⇒', () => expect(jssm.arrow_direction('⇒')).toBe('right'));
19
+ // test('verify ↛', () => expect(jssm.arrow_direction('↛')).toBe('right'));
20
+
21
+ // test('verify ↔', () => expect(jssm.arrow_direction('↔')).toBe('both'));
22
+ // test('verify ⇔', () => expect(jssm.arrow_direction('⇔')).toBe('both'));
23
+ // test('verify ↮', () => expect(jssm.arrow_direction('↮')).toBe('both'));
24
+
25
+ // test('verify ←⇒', () => expect(jssm.arrow_direction('←⇒')).toBe('both'));
26
+ // test('verify ⇐→', () => expect(jssm.arrow_direction('⇐→')).toBe('both'));
27
+ // test('verify ←↛', () => expect(jssm.arrow_direction('←↛')).toBe('both'));
28
+ // test('verify ↚→', () => expect(jssm.arrow_direction('↚→')).toBe('both'));
29
+ // test('verify ⇐↛', () => expect(jssm.arrow_direction('⇐↛')).toBe('both'));
30
+ // test('verify ↚⇒', () => expect(jssm.arrow_direction('↚⇒')).toBe('both'));
31
+
32
+ // });
33
+
34
+
35
+
36
+
37
+
38
+ // describe('arrow_left_kind', () => {
39
+
40
+ // test('verify →', () => expect(jssm.arrow_left_kind('→')).toBe('none'));
41
+ // test('verify ⇒', () => expect(jssm.arrow_left_kind('⇒')).toBe('none'));
42
+ // test('verify ↛', () => expect(jssm.arrow_left_kind('↛')).toBe('none'));
43
+
44
+ // test('verify ←', () => expect(jssm.arrow_left_kind('←')).toBe('legal'));
45
+ // test('verify ↔', () => expect(jssm.arrow_left_kind('↔')).toBe('legal'));
46
+ // test('verify ←⇒', () => expect(jssm.arrow_left_kind('←⇒')).toBe('legal'));
47
+ // test('verify ←↛', () => expect(jssm.arrow_left_kind('←↛')).toBe('legal'));
48
+
49
+ // test('verify ⇐', () => expect(jssm.arrow_left_kind('⇐')).toBe('main'));
50
+ // test('verify ⇔', () => expect(jssm.arrow_left_kind('⇔')).toBe('main'));
51
+ // test('verify ⇐→', () => expect(jssm.arrow_left_kind('⇐→')).toBe('main'));
52
+ // test('verify ⇐↛', () => expect(jssm.arrow_left_kind('⇐↛')).toBe('main'));
53
+
54
+ // test('verify ↚', () => expect(jssm.arrow_left_kind('↚')).toBe('forced'));
55
+ // test('verify ↮', () => expect(jssm.arrow_left_kind('↮')).toBe('forced'));
56
+ // test('verify ↚→', () => expect(jssm.arrow_left_kind('↚→')).toBe('forced'));
57
+ // test('verify ↚⇒', () => expect(jssm.arrow_left_kind('↚⇒')).toBe('forced'));
58
+
59
+ // });
60
+
61
+
62
+
63
+
64
+
65
+ // describe('arrow_right_kind', () => {
66
+
67
+ // test('verify ←', () => expect(jssm.arrow_right_kind('←')).toBe('none'));
68
+ // test('verify ⇐', () => expect(jssm.arrow_right_kind('⇐')).toBe('none'));
69
+ // test('verify ↚', () => expect(jssm.arrow_right_kind('↚')).toBe('none'));
70
+
71
+ // test('verify →', () => expect(jssm.arrow_right_kind('→')).toBe('legal'));
72
+ // test('verify ↔', () => expect(jssm.arrow_right_kind('↔')).toBe('legal'));
73
+ // test('verify ⇐→', () => expect(jssm.arrow_right_kind('⇐→')).toBe('legal'));
74
+ // test('verify ↚→', () => expect(jssm.arrow_right_kind('↚→')).toBe('legal'));
75
+
76
+ // test('verify ⇒', () => expect(jssm.arrow_right_kind('⇒')).toBe('main'));
77
+ // test('verify ⇔', () => expect(jssm.arrow_right_kind('⇔')).toBe('main'));
78
+ // test('verify ←⇒', () => expect(jssm.arrow_right_kind('←⇒')).toBe('main'));
79
+ // test('verify ↚⇒', () => expect(jssm.arrow_right_kind('↚⇒')).toBe('main'));
80
+
81
+ // test('verify ↛', () => expect(jssm.arrow_right_kind('↛')).toBe('forced'));
82
+ // test('verify ↮', () => expect(jssm.arrow_right_kind('↮')).toBe('forced'));
83
+ // test('verify ←↛', () => expect(jssm.arrow_right_kind('←↛')).toBe('forced'));
84
+ // test('verify ⇐↛', () => expect(jssm.arrow_right_kind('⇐↛')).toBe('forced'));
85
+
86
+ // });
87
+
88
+ // // stochable