mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +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"
|
"frappe": "cli.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "mocha tests",
|
"test": "NODE_ENV=test mocha --timeout 3000 tests",
|
||||||
"start": "nodemon app.js"
|
"start": "nodemon app.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -11,9 +11,7 @@ var test_server;
|
|||||||
|
|
||||||
describe('REST', () => {
|
describe('REST', () => {
|
||||||
before(async function() {
|
before(async function() {
|
||||||
test_server = spawn('node', ['tests/test_server.js'], {
|
test_server = spawn('node', ['tests/test_server.js'], { stdio: 'inherit' });
|
||||||
stdio: [process.stdin, process.stdout, process.stderr, 'pipe', 'pipe']
|
|
||||||
});
|
|
||||||
|
|
||||||
await frappe.init();
|
await frappe.init();
|
||||||
await frappe.login('Administrator');
|
await frappe.login('Administrator');
|
||||||
@ -22,7 +20,7 @@ describe('REST', () => {
|
|||||||
frappe.fetch = fetch;
|
frappe.fetch = fetch;
|
||||||
|
|
||||||
// wait for server to start
|
// wait for server to start
|
||||||
await frappe.sleep(1);
|
return await frappe.sleep(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
after(() => {
|
after(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user