1
0
Fork 0

chore: Added unittest for patterns

This commit is contained in:
Joost De Cock 2020-03-14 15:04:45 +01:00
parent f6bad3c76f
commit ba45537ea6
131 changed files with 1832 additions and 146 deletions

View file

@ -10,7 +10,14 @@ const App = props => {
let instance = new Pattern()
let config = instance.config
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
return (
<Workbench
freesewing={freesewing}
Pattern={Pattern}
config={config}
userLanguage="en"
/>
)
}
export default App

View file

@ -30,7 +30,8 @@
"pubforce": "npm publish",
"symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -",
"start": "rollup -c -w",
"netlify": "echo \"Not configured yet\""
"netlify": "echo \"Not configured yet\"",
"testonly": "BABEL_ENV=production ../../node_modules/.bin/_mocha tests/*.test.js --require @babel/register"
},
"peerDependencies": {
"@freesewing/core": "^2.4.3",
@ -42,7 +43,7 @@
"react-dom": "^16.8",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"babel-eslint": "10.0.1",
"eslint": "^6.8.0",
"eslint": "^5.16.0",
"babel-jest": "24.7.1",
"jest": "24.7.1",
"@freesewing/components": "^2.4.3",
@ -57,7 +58,7 @@
"cross-env": "^5.1.4",
"gh-pages": "^1.2.0",
"react-scripts": "^3.0.0",
"webpack": "4.42.0",
"webpack": "4.29.6",
"rollup": "^0.64.1",
"rollup-plugin-babel": "^4.0.1",
"rollup-plugin-babel-minify": "^7.0.0",

View file

@ -0,0 +1,10 @@
// This file is auto-generated.
// Changes you make will be overwritten.
const Tutorial = require('../dist')
const testPatternConfig = require('../../../tests/patterns/config')
// The pattern's metadata from package.json
const meta =
// Test config
testPatternConfig('tutorial', new Tutorial(), meta)