Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Apr 26, 2019
1 parent 12b58a1 commit d78b33c
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
5 changes: 0 additions & 5 deletions .babelrc

This file was deleted.

5 changes: 5 additions & 0 deletions babel.config.js
@@ -0,0 +1,5 @@
module.exports = {
'presets': [
'@babel/preset-env'
]
}
6 changes: 6 additions & 0 deletions package.json
Expand Up @@ -75,6 +75,12 @@
"src"
],
"jest": {
"transform": {
"^.+\\.jsx?$": "./transformer.js"
},
"transformIgnorePatterns": [
"/node_modules/(?!dagre-d3-renderer/lib).*\\.js"
],
"moduleNameMapper": {
"\\.(css|scss)$": "identity-obj-proxy"
}
Expand Down
2 changes: 1 addition & 1 deletion src/mermaidAPI.js
Expand Up @@ -50,7 +50,7 @@ for (const themeName of ['default', 'forest', 'dark', 'neutral']) {
*/
const config = {

/** theme , the CSS style sheet
/** theme , the CSS style sheet
*
* **theme** - Choose one of the built-in themes: default, forest, dark or neutral. To disable any pre-defined mermaid theme, use "null".
* **themeCSS** - Use your own CSS. This overrides **theme**.
Expand Down
3 changes: 3 additions & 0 deletions transformer.js
@@ -0,0 +1,3 @@
module.exports = require('babel-jest').createTransformer({
rootMode: 'upward'
})
5 changes: 4 additions & 1 deletion webpack.config.base.js
Expand Up @@ -8,7 +8,10 @@ const amdRule = {

const jsRule = {
test: /\.js$/,
exclude: /node_modules/,
include: [
path.resolve(__dirname, './src'),
path.resolve(__dirname, './node_modules/dagre-d3-renderer/lib')
],
use: {
loader: 'babel-loader'
}
Expand Down

0 comments on commit d78b33c

Please sign in to comment.