Skip to content

Commit afb7be2

Browse files
committed
add tests
1 parent ffe8dc9 commit afb7be2

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"repository": "https://github.com/atom-ide-community/babel-plugin-transform-not-strict",
1717
"license": "MIT",
1818
"scripts": {
19-
"test": "atom --test spec/test.js",
19+
"test": "atom --test spec/spec.js",
2020
"bump": "ncu -u"
2121
},
2222
"peerDependencies": {

spec/spec.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const pluginTester = require('babel-plugin-tester').default
2+
3+
const transformNotStrict = require('../src/index.js')
4+
5+
pluginTester({
6+
plugin: transformNotStrict,
7+
filename: __filename,
8+
tests: [
9+
{
10+
code: '"not strict"; "use strict";',
11+
output:'"not strict";',
12+
},
13+
{
14+
code: '"not strict";',
15+
output:'"not strict";',
16+
},
17+
]
18+
})

0 commit comments

Comments
 (0)