add 2 more tests
This commit is contained in:
parent
c7e882e001
commit
d686b65dbe
1 changed files with 12 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue