mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-17 00:28:27 +00:00
add 2 more tests
This commit is contained in:
parent
c7e882e001
commit
d686b65dbe
@ -207,10 +207,20 @@ describe('getLeafLocation', () => {
|
|||||||
|
|
||||||
describe('getLeafLocations', () => {
|
describe('getLeafLocations', () => {
|
||||||
it('gets locations of leaf nodes', () => {
|
it('gets locations of leaf nodes', () => {
|
||||||
const code = '"bd sd"';
|
expect(getLeafLocations('"bd sd"')).toEqual([
|
||||||
expect(getLeafLocations(code)).toEqual([
|
|
||||||
[1, 3], // bd columns
|
[1, 3], // bd columns
|
||||||
[4, 6], // sd columns
|
[4, 6], // sd columns
|
||||||
]);
|
]);
|
||||||
|
expect(getLeafLocations('"bd*2 [sd cp]"')).toEqual([
|
||||||
|
[1, 3], // bd columns
|
||||||
|
[7, 9], // sd columns
|
||||||
|
[10, 12], // cp columns
|
||||||
|
[4, 5], // "2" columns
|
||||||
|
]);
|
||||||
|
expect(getLeafLocations('"bd*<2 3>"')).toEqual([
|
||||||
|
[1, 3], // bd columns
|
||||||
|
[5, 6], // "2" columns
|
||||||
|
[7, 8], // "3" columns
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user