Skip to content

Commit

Permalink
Migrate to jest
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyfer committed Apr 16, 2018
1 parent dc1f89a commit 773e93c
Show file tree
Hide file tree
Showing 18 changed files with 679 additions and 195 deletions.
275 changes: 275 additions & 0 deletions __tests__/__snapshots__/comment.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,275 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Comment should tokenize a comment that does not have a space before the end 1`] = `
Array [
Array [
"startComment",
"/*",
1,
2,
],
Array [
"word",
"my",
1,
3,
1,
4,
],
Array [
"space",
" ",
],
Array [
"word",
"comment",
1,
6,
1,
12,
],
Array [
"endComment",
"*/",
1,
14,
],
]
`;

exports[`Comment should tokenize a docblock comment 1`] = `
Array [
Array [
"startComment",
"/*",
1,
2,
],
Array [
"word",
"*",
1,
3,
1,
3,
],
Array [
"newline",
"
",
2,
0,
],
Array [
"space",
" ",
],
Array [
"word",
"*",
2,
2,
2,
2,
],
Array [
"space",
" ",
],
Array [
"word",
"line",
2,
4,
2,
7,
],
Array [
"space",
" ",
],
Array [
"word",
"1",
2,
9,
2,
9,
],
Array [
"newline",
"
",
3,
0,
],
Array [
"space",
" ",
],
Array [
"word",
"*",
3,
2,
3,
2,
],
Array [
"newline",
"
",
4,
0,
],
Array [
"space",
" ",
],
Array [
"word",
"*",
4,
2,
4,
2,
],
Array [
"space",
" ",
],
Array [
"word",
"line",
4,
4,
4,
7,
],
Array [
"space",
" ",
],
Array [
"word",
"2",
4,
9,
4,
9,
],
Array [
"newline",
"
",
5,
0,
],
Array [
"space",
" ",
],
Array [
"endComment",
"*/",
5,
3,
],
]
`;

exports[`Comment should tokenize a multiline comment 1`] = `
Array [
Array [
"startComment",
"/*",
1,
2,
],
Array [
"newline",
"
",
2,
0,
],
Array [
"word",
"my",
2,
1,
2,
2,
],
Array [
"space",
" ",
],
Array [
"word",
"comment",
2,
4,
2,
10,
],
Array [
"newline",
"
",
3,
0,
],
Array [
"endComment",
"*/",
3,
2,
],
]
`;

exports[`Comment should tokenize a simple comment 1`] = `
Array [
Array [
"startComment",
"/*",
1,
2,
],
Array [
"space",
" ",
],
Array [
"word",
"my",
1,
4,
1,
5,
],
Array [
"space",
" ",
],
Array [
"word",
"comment",
1,
7,
1,
13,
],
Array [
"space",
" ",
],
Array [
"endComment",
"*/",
1,
16,
],
]
`;
Loading

0 comments on commit 773e93c

Please sign in to comment.