Skip to content

Commit 169cad2

Browse files
committed
fix template
1 parent f16fc13 commit 169cad2

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

lib/template/jsimport/request.dot

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
const chai = require('chai')
2-
chai.use(require('chai-http'))
3-
const schema = require('{{jsonSchemaPath}}');
4-
const requestHelper = require('{{helperPath}}');
5-
const config = require('{{configPath}}')
1+
import chai from 'chai'
2+
import chaiHttp from 'chai-http'
3+
import main from '{{mainpagesPath}}'
4+
import schema from '{{jsonSchemaPath}}'
5+
import requestHelper from '{{helperPath}}'
6+
import config from '{{configPath}}'
7+
chai.use(chaiHttp)
68

79
class pages {
810
constructor() {
@@ -40,4 +42,4 @@ class pages {
4042
}
4143
}
4244

43-
module.exports = pages
45+
export default pages

lib/template/jsimport/requestWithAttach.dot

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
const chai = require('chai')
2-
chai.use(require('chai-http'))
3-
const schema = require('{{jsonSchemaPath}}');
4-
const requestHelper = require('{{helperPath}}');
5-
const config = require('{{configPath}}')
1+
import chai from 'chai'
2+
import chaiHttp from 'chai-http'
3+
import main from '{{mainpagesPath}}'
4+
import schema from '{{jsonSchemaPath}}'
5+
import requestHelper from '{{helperPath}}'
6+
import config from '{{configPath}}'
7+
chai.use(chaiHttp)
68

79
class pages {
810
constructor() {
@@ -70,4 +72,4 @@ class pages {
7072
}
7173
}
7274

73-
module.exports = pages
75+
export default pages

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dot-generator-mocha",
3-
"version": "1.3.5",
3+
"version": "1.3.7",
44
"main": "index.js",
55
"scripts": {
66
"test": "echo \"Error: no test specified\" && exit 1",

0 commit comments

Comments
 (0)