File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Ignore temporary files by giving them a special name
12* .ignore
23* .ignore. *
34ignore. *
5+
6+ # Ignore sensitive files
7+ .env
8+ .npmrc
9+ * .local
10+
11+ # Ignore transpiled source (used for advanced debugging)
12+ .transpiled
13+
14+ # Ignore any external scripts
15+ external-scripts /bin
16+
17+ # Ignore build artifacts
418* .tsbuildinfo
519dist
620build
7- .vscode
8- ! .vscode /launch.json
921.vercel
10- .env
11- .npmrc
12- external-scripts /bin
22+ .next
1323next-env.d.ts
14- node_modules
1524coverage
25+
26+ # Ignore local configuration
27+ .vscode
28+ ! .vscode /launch.example.json
29+
30+ # Ignore node_modules
31+ node_modules
32+
33+ # Ignore random nothingness
1634.DS_Store
Original file line number Diff line number Diff line change 1+ /* eslint jest/require-hook: ["error", { "allowedFunctionCalls": ["pluginTester"] }] */
2+
3+ import { pluginTester } from '../src/index' ;
4+
5+ beforeAll ( ( ) => {
6+ process . env . BABEL_8_BREAKING = '1' ;
7+ } ) ;
8+
9+ afterAll ( ( ) => {
10+ delete process . env . BABEL_8_BREAKING ;
11+ } ) ;
12+
13+ pluginTester ( {
14+ pluginName : 'captains-log' ,
15+ plugin : ( ) => ( {
16+ name : 'captains-log' ,
17+ visitor : {
18+ VariableDeclaration ( path ) {
19+ throw new Error ( 'bad' ) ;
20+ console . log ( 'hello world!' ) ;
21+ }
22+ }
23+ } ) ,
24+ tests : [
25+ {
26+ code : `var output = paragraph + "one"+\n\n'paragraph' + \`\\two\`` ,
27+ output : "var output = paragraph + 'one' + 'paragraph' + `\\two`;\n"
28+ }
29+ ]
30+ } ) ;
You can’t perform that action at this time.
0 commit comments