Skip to content

Commit 674de3b

Browse files
author
DavertMik
committed
fixed some rest tests
1 parent acdd13c commit 674de3b

File tree

3 files changed

+5
-30
lines changed

3 files changed

+5
-30
lines changed

test/data/rest/db.json

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1 @@
1-
{
2-
"comments": [],
3-
"posts": [
4-
{
5-
"id": 1,
6-
"title": "json-server",
7-
"author": "davert"
8-
}
9-
]
10-
}
1+
{ "posts": [{ "id": 1, "title": "json-server", "author": "davert" }], "user": { "name": "davert" } }

test/data/sandbox/configs/definitions/steps.d.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

test/rest/REST_test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import path from 'path'
22
import { expect } from 'expect'
33
import fs from 'fs'
4+
import { fileURLToPath } from 'url'
45

56
import TestHelper from '../support/TestHelper.js'
67
import REST from '../../lib/helper/REST.js'
78
import Container from '../../lib/container.js'
89
import Secret from '../../lib/secret.js'
910

11+
const __filename = fileURLToPath(import.meta.url)
12+
const __dirname = path.dirname(__filename)
13+
1014
const api_url = TestHelper.jsonServerUrl()
1115
import * as codeceptjs from '../../lib/index.js'
1216
global.codeceptjs = codeceptjs.default || codeceptjs

0 commit comments

Comments
 (0)