mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-12 16:59:01 +08:00
add first test with jest
This commit is contained in:
parent
181cebc8f2
commit
35880251cd
@ -17,8 +17,11 @@ module.exports = {
|
||||
window: false,
|
||||
collect: false,
|
||||
cy: false,
|
||||
test: false,
|
||||
expect: false,
|
||||
it: false,
|
||||
describe: false,
|
||||
FileReader: false,
|
||||
},
|
||||
|
||||
extends: [
|
||||
|
8
babel.config.js
Normal file
8
babel.config.js
Normal file
@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@babel/preset-env',
|
||||
],
|
||||
plugins: [
|
||||
'@babel/plugin-syntax-dynamic-import',
|
||||
],
|
||||
}
|
15
package.json
15
package.json
@ -10,16 +10,7 @@
|
||||
"build:examples": "node ./node_modules/@babel/node/bin/babel-node.js ./build/examples/build.js --env=production",
|
||||
"release": "yarn build:packages && lerna publish",
|
||||
"lint": "eslint ./packages/**/src/**",
|
||||
"prebuild:packages": "yarn lint",
|
||||
"prebuild:examples": "yarn lint"
|
||||
},
|
||||
"babel": {
|
||||
"presets": [
|
||||
"@babel/preset-env"
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-syntax-dynamic-import"
|
||||
]
|
||||
"test": "jest"
|
||||
},
|
||||
"postcss": {
|
||||
"plugins": {
|
||||
@ -41,7 +32,9 @@
|
||||
"@babel/preset-stage-2": "^7.0.0",
|
||||
"@babel/runtime": "^7.1.5",
|
||||
"autoprefixer": "^9.3.1",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-jest": "^23.6.0",
|
||||
"babel-loader": "^8.0.4",
|
||||
"browser-sync": "^2.26.3",
|
||||
"connect-history-api-fallback": "^1.5.0",
|
||||
@ -59,6 +52,7 @@
|
||||
"http-proxy-middleware": "^0.19.0",
|
||||
"http-server": "^0.11.1",
|
||||
"imagemin-webpack-plugin": "^2.3.0",
|
||||
"jest": "^23.6.0",
|
||||
"lerna": "^3.4.3",
|
||||
"mini-css-extract-plugin": "^0.4.4",
|
||||
"minimist": "^1.2.0",
|
||||
@ -68,6 +62,7 @@
|
||||
"postcss": "^7.0.5",
|
||||
"postcss-loader": "^3.0.0",
|
||||
"postcss-scss": "^2.0.0",
|
||||
"regenerator-runtime": "^0.12.1",
|
||||
"rollup": "^0.67.0",
|
||||
"rollup-plugin-buble": "^0.19.4",
|
||||
"rollup-plugin-commonjs": "^9.2.0",
|
||||
|
@ -26,6 +26,7 @@ export default class Editor {
|
||||
setOptions(options) {
|
||||
const defaultOptions = {
|
||||
editable: true,
|
||||
extensions: [],
|
||||
content: '',
|
||||
onUpdate: () => {},
|
||||
}
|
||||
|
7
packages/tiptap/src/utils/Editor.spec.js
Normal file
7
packages/tiptap/src/utils/Editor.spec.js
Normal file
@ -0,0 +1,7 @@
|
||||
import Editor from './Editor'
|
||||
|
||||
test('can create editor', () => {
|
||||
const editor = new Editor()
|
||||
|
||||
expect(editor).toBeDefined()
|
||||
})
|
Loading…
Reference in New Issue
Block a user