This commit is contained in:
idok 2018-02-06 15:34:52 +02:00
parent 2e4d022ad0
commit aa32337b77
5 changed files with 21 additions and 21 deletions

34
package.json Normal file → Executable file
View File

@ -31,10 +31,10 @@
},
"homepage": "https://github.com/wix/react-templates",
"dependencies": {
"chalk": "1.1.3",
"chalk": "2.3.0",
"cheerio": "0.22.0",
"css": "2.2.1",
"escodegen": "1.8.1",
"escodegen": "1.9.0",
"esprima": "4.0.0",
"glob": "7.1.2",
"lodash": "4.17.4",
@ -43,32 +43,32 @@
"text-table": "0.2.0"
},
"devDependencies": {
"babel-cli": "6.24.1",
"babel-core": "6.25.0",
"babel-loader": "7.1.1",
"babel-cli": "6.26.0",
"babel-core": "6.26.0",
"babel-loader": "7.1.2",
"babel-preset-es2015": "6.24.1",
"brace": "0.10.0",
"brfs": "1.4.3",
"coveralls": "2.13.1",
"eslint": "4.1.1",
"eslint-config-wix-editor": "0.2.3",
"eslint-plugin-lodash": "2.4.3",
"eslint-plugin-react": "7.1.0",
"coveralls": "3.0.0",
"eslint": "4.11.0",
"eslint-config-wix-editor": "0.5.1",
"eslint-plugin-lodash": "2.5.0",
"eslint-plugin-react": "7.4.0",
"eslint-plugin-wix-editor": "1.1.1",
"grunt": "1.0.1",
"grunt-babel": "6.0.0",
"grunt-browserify": "5.0.0",
"grunt-babel": "7.0.0",
"grunt-browserify": "5.2.0",
"grunt-contrib-requirejs": "1.0.0",
"grunt-contrib-uglify": "3.0.1",
"grunt-contrib-uglify": "3.1.0",
"grunt-contrib-watch": "1.0.0",
"grunt-eslint": "20.0.0",
"grunt-eslint": "20.1.0",
"istanbul": "0.4.5",
"json-loader": "0.5.4",
"mocha": "3.4.2",
"json-loader": "0.5.7",
"mocha": "4.0.1",
"react": "15.3.2",
"react-dom": "15.3.2",
"react-native": "0.45.1",
"webpack": "3.0.0"
"webpack": "3.8.1"
},
"keywords": [
"templates",

View File

@ -46,7 +46,7 @@ describe('utils', () => {
let equal = false
try {
const html = fs.readFileSync(filename).toString()
const expected = testUtils.normalizeHtml(readFileNormalized(filename + '.html'))
const expected = testUtils.normalizeHtml(readFileNormalized(`${filename}.html`))
const code = reactTemplates.convertTemplateToReact(html, options).replace(/\r/g, '')
actual = testUtils.normalizeHtml(testUtils.codeToHtml(code))
equal = assert.equal(actual, expected, `${testFile}`)
@ -55,7 +55,7 @@ describe('utils', () => {
assert.fail(e)
}
if (!equal) {
fs.writeFileSync(filename + '.actual.html', actual)
fs.writeFileSync(`${filename}.actual.html`, actual)
}
})
})

View File

@ -6,7 +6,7 @@ const readFileNormalized = testUtils.readFileNormalized
const compareAndWrite = testUtils.compareAndWrite
const path = require('path')
const context = require('../../src/context')
const assert = require('assert')
// const assert = require('assert')
const dataPath = path.resolve(__dirname, '..', 'data')
/**

View File

@ -3,6 +3,7 @@ const context = require('../../src/context')
const _ = require('lodash')
const path = require('path')
const assert = require('assert')
const dataPath = path.resolve(__dirname, '..', 'data')
describe('rtStyle', () => {
it('should convertBody style successfully', () => {

View File

@ -20,7 +20,6 @@ function normalizeHtml(html) {
}
/**
* @param {*} t
* @param {string} actual
* @param {string} expected
* @param {string} filename