mirror of
https://github.com/frappe/books.git
synced 2024-12-23 19:39:07 +00:00
tests: increase mocha timeout to let server start
This commit is contained in:
parent
666c4969aa
commit
1aabf7ef40
18
frappe.conf.js
Normal file
18
frappe.conf.js
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
module.exports = {
|
||||
staticPath: './static',
|
||||
distPath: './dist',
|
||||
dev: {
|
||||
outputDir: './dist',
|
||||
assetsPublicPath: '/',
|
||||
devServerPort: 8000,
|
||||
env: {
|
||||
PORT: process.env.PORT || 8000
|
||||
}
|
||||
},
|
||||
node: {
|
||||
paths: {
|
||||
main: 'server/index.js'
|
||||
}
|
||||
}
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
"frappe": "cli.js"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha tests",
|
||||
"test": "NODE_ENV=test mocha --timeout 3000 tests",
|
||||
"start": "nodemon app.js"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -11,9 +11,7 @@ var test_server;
|
||||
|
||||
describe('REST', () => {
|
||||
before(async function() {
|
||||
test_server = spawn('node', ['tests/test_server.js'], {
|
||||
stdio: [process.stdin, process.stdout, process.stderr, 'pipe', 'pipe']
|
||||
});
|
||||
test_server = spawn('node', ['tests/test_server.js'], { stdio: 'inherit' });
|
||||
|
||||
await frappe.init();
|
||||
await frappe.login('Administrator');
|
||||
@ -22,7 +20,7 @@ describe('REST', () => {
|
||||
frappe.fetch = fetch;
|
||||
|
||||
// wait for server to start
|
||||
await frappe.sleep(1);
|
||||
return await frappe.sleep(2);
|
||||
});
|
||||
|
||||
after(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user