diff --git a/package.json b/package.json index 2f53b92..8486327 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "build": "babel src -d lib", "watch": "babel -w src -d lib", "example": "npm run build && babel example/input.js -o example/output.js", + "pretest": "npm run build", "test": "mocha --require @babel/register", "test:watch": "npm run test -- --watch", "prepublish": "npm run clean && npm run build" diff --git a/test/fixtures/example/.babelrc b/test/fixtures/example/.babelrc index d67bd0c..4e92618 100644 --- a/test/fixtures/example/.babelrc +++ b/test/fixtures/example/.babelrc @@ -1,6 +1,6 @@ { "presets": ["@babel/preset-env"], "plugins": [ - ["../../../src"] + ["../../../"] ] } diff --git a/test/fixtures/example/expected.js b/test/fixtures/example/expected.js index c8748f9..a48d779 100644 --- a/test/fixtures/example/expected.js +++ b/test/fixtures/example/expected.js @@ -1,8 +1,10 @@ +"use strict"; + var config = { - foo: 'bar' + foo: "bar" }; -var foo = 'bar'; -var name = 'babel-plugin-inline-json'; +var foo = "bar"; +var name = "babel-plugin-inline-json"; var foo = require('@babel/register');