Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support for array targets and array destinations in transitions
- Loading branch information
1 parent
305e9a0
commit c8ac664
Showing
7 changed files
with
103 additions
and
35 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "jssm", | ||
"version": "4.1.17", | ||
"version": "4.1.18", | ||
"engines": { | ||
"node": ">=6.0.0" | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
/* eslint-disable max-len */ | ||
|
||
import {describe} from 'ava-spec'; | ||
|
||
const jssm = require('../../../build/jssm.es5.js'); | ||
|
||
|
||
|
||
|
||
|
||
describe('array on left', async it => { | ||
|
||
const aLeft = [{"from":"a","to":"d","kind":"legal"},{"from":"b","to":"d","kind":"legal"},{"from":"c","to":"d","kind":"legal"}]; | ||
|
||
it('[a b c]->d;', t => t.deepEqual(aLeft, jssm.compile(jssm.parse('[a b c]->d;')).transitions )); | ||
|
||
}); | ||
|
||
|
||
|
||
|
||
|
||
describe('array on right', async it => { | ||
|
||
const aRight = [{"from":"a","to":"b","kind":"legal"},{"from":"a","to":"c","kind":"legal"},{"from":"a","to":"d","kind":"legal"}]; | ||
|
||
it('a->[b c d];', t => t.deepEqual(aRight, jssm.compile(jssm.parse('a->[b c d];')).transitions )); | ||
|
||
}); | ||
|
||
|
||
|
||
|
||
|
||
describe('array on both sides', async it => { | ||
|
||
const aBoth = [{"from":"a","to":"x","kind":"legal"},{"from":"a","to":"y","kind":"legal"},{"from":"a","to":"z","kind":"legal"},{"from":"b","to":"x","kind":"legal"},{"from":"b","to":"y","kind":"legal"},{"from":"b","to":"z","kind":"legal"},{"from":"c","to":"x","kind":"legal"},{"from":"c","to":"y","kind":"legal"},{"from":"c","to":"z","kind":"legal"}]; | ||
|
||
it('[a b c]->[x y z];', t => t.deepEqual(aBoth, jssm.compile(jssm.parse('[a b c]->[x y z];')).transitions )); | ||
|
||
}); |