diff --git a/jest.config.js b/jest.config.js index 02b831b..9cce56d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -18,5 +18,8 @@ module.exports = { }, testEnvironment: "node", testMatch: ["**/__tests__/*.js"], - testPathIgnorePatterns: ["/node_modules/", ".eslintrc.js"] + testPathIgnorePatterns: ["/node_modules/", ".eslintrc.js"], + transformIgnorePatterns: [ + "/node_modules/(?!magic-script-components).+(js|jsx)$" + ] }; diff --git a/package.json b/package.json index a69d143..64bfeeb 100644 --- a/package.json +++ b/package.json @@ -32,15 +32,17 @@ }, "peerDependencies": { "@babel/core": "^7.6.0", - "@babel/plugin-transform-react-jsx": "^7.3.0", "@babel/plugin-proposal-class-properties": "^7.5.5", + "@babel/plugin-transform-react-jsx": "^7.3.0", "rollup-plugin-babel": "^4.3.3" }, "devDependencies": { + "@babel/core": "^7.6.0", "@babel/preset-env": "^7.6.0", "@babel/preset-react": "^7.0.0", "babel-jest": "^24.9.0", "jest": "^24.9.0", + "magic-script-components": "2.0.0", "react-test-renderer": "^16.9.0" } } diff --git a/src/__tests__/Audio.spec.js b/src/__tests__/Audio.spec.js index d0398a1..656bd68 100644 --- a/src/__tests__/Audio.spec.js +++ b/src/__tests__/Audio.spec.js @@ -1,11 +1,11 @@ // import React from "react"; import { create } from "react-test-renderer"; +import { Audio } from "magic-script-components"; describe("Audio component", () => { test("Matches the snapshot", () => { - const props = {fileName: "test_file.avi"}; - const audio = create(React.createElement("audio", props)); + const audio = create(