1
0
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:
Yury Shkoda
2021-10-06 09:13:17 +03:00
parent a18502671e
commit 57f3824ba8
2 changed files with 3 additions and 3 deletions

View File

@@ -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"

View File

@@ -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."}'
) )