mirror of
https://github.com/sasjs/server.git
synced 2026-01-16 10:20:05 +00:00
test: create tmp folder if it doesn't exist before tests
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
"build": "rimraf build && tsc",
|
"build": "rimraf build && tsc",
|
||||||
"semantic-release": "semantic-release -d",
|
"semantic-release": "semantic-release -d",
|
||||||
"prepare": "[ -d .git ] && git config core.hooksPath ./.git-hooks || true",
|
"prepare": "[ -d .git ] && git config core.hooksPath ./.git-hooks || true",
|
||||||
"test": "jest --coverage",
|
"test": "mkdir -p tmp && jest --coverage",
|
||||||
"lint:fix": "npx prettier --write \"src/**/*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}\"",
|
"lint:fix": "npx prettier --write \"src/**/*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}\"",
|
||||||
"lint": "npx prettier --check \"src/**/*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}\"",
|
"lint": "npx prettier --check \"src/**/*.{ts,tsx,js,jsx,html,css,sass,less,yml,md,graphql}\"",
|
||||||
"package:lib": "npm run build && cp ./package.json build && cp README.md build && cd build && npm version \"5.0.0\" && npm pack"
|
"package:lib": "npm run build && cp ./package.json build && cp README.md build && cd build && npm version \"5.0.0\" && npm pack"
|
||||||
|
|||||||
@@ -73,10 +73,10 @@ describe('deploy', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it.only('should respond with payload example if valid payload was not provided', async () => {
|
it('should respond with payload example if valid payload was not provided', async () => {
|
||||||
const res = await request(app).post('/deploy').send(getTreeExample())
|
const res = await request(app).post('/deploy').send(getTreeExample())
|
||||||
|
|
||||||
// expect(res.statusCode).toEqual(200)
|
expect(res.statusCode).toEqual(200)
|
||||||
expect(res.text).toEqual(
|
expect(res.text).toEqual(
|
||||||
'{"status":"success","message":"Files deployed successfully to @sasjs/server."}'
|
'{"status":"success","message":"Files deployed successfully to @sasjs/server."}'
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user