Skip to content

Commit b10bc09

Browse files
committed
refactor into test-engine
1 parent 4633dd7 commit b10bc09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+67
-103
lines changed

index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
<meta property="og:url" content="https://cache-tests.fyi/">
1111
<meta property="og:site_name" content="HTTP Caching Tests">
1212
<meta property="og:image" content="https://cache-tests.fyi/asset/badge.png">
13-
<link rel="preload" as="fetch" crossorigin href="/lib/tpl/explain-test.liquid">
14-
<link rel="preload" as="fetch" crossorigin href="/lib/tpl/checks.liquid">
15-
<link rel="preload" as="fetch" crossorigin href="/lib/tpl/header-list.liquid">
16-
<link rel="preload" as="fetch" crossorigin href="/lib/tpl/header-magic.liquid">
13+
<link rel="preload" as="fetch" crossorigin href="/test-engine/lib/tpl/explain-test.liquid">
14+
<link rel="preload" as="fetch" crossorigin href="/test-engine/lib/tpl/checks.liquid">
15+
<link rel="preload" as="fetch" crossorigin href="/test-engine/lib/tpl/header-list.liquid">
16+
<link rel="preload" as="fetch" crossorigin href="/test-engine/lib/tpl/header-magic.liquid">
1717
<script type="module">
1818
import index from './results/index.mjs'
19-
import * as summary from './lib/summary.mjs'
20-
import * as display from './lib/display.mjs'
19+
import * as summary from './test-engine/lib/summary.mjs'
20+
import * as display from './test-engine/lib/display.mjs'
2121
import baseTests from './tests/index.mjs'
2222
import surrogate from './tests/surrogate-control.mjs'
2323

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
"npm": "^6.14.11"
1717
},
1818
"scripts": {
19-
"server": "node server/server.mjs",
20-
"cli": "node --no-warnings cli.mjs",
21-
"export": "node --no-warnings export.mjs",
22-
"validate": "node --no-warnings export.mjs validate",
23-
"lint": "standard *.mjs client/*.mjs server/*.mjs lib/*.mjs tests/*.mjs spec/*.mjs",
24-
"fix": "standard --fix *.mjs client/*.mjs server/*.mjs lib/*.mjs tests/*.mjs spec/*.mjs"
19+
"server": "node test-engine/server/server.mjs",
20+
"cli": "node --no-warnings test-engine/cli.mjs",
21+
"export": "node --no-warnings test-engine/export.mjs",
22+
"validate": "node --no-warnings test-engine/export.mjs validate",
23+
"lint": "standard test-engine tests spec",
24+
"fix": "standard --fix test-engine tests spec"
2525
},
2626
"config": {
2727
"protocol": "http",
@@ -37,6 +37,6 @@
3737
"devDependencies": {
3838
"ajv": "^6.12.5",
3939
"font-awesome": "^4.7.0",
40-
"standard": "^14.3.4"
40+
"standard": "^17.1.0"
4141
}
4242
}

test-browser.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<title>Browser HTTP Caching Tests</title>
66
<link rel="stylesheet" href="style.css" type="text/css">
77
<script type="module">
8-
import { runTests, getResults } from './client/runner.mjs'
9-
import { testUUIDs } from './client/test.mjs'
10-
import * as display from './lib/display.mjs'
8+
import { runTests, getResults } from './test-engine/client/runner.mjs'
9+
import { testUUIDs } from './test-engine/client/test.mjs'
10+
import * as display from './test-engine/lib/display.mjs'
1111
import baseTests from './tests/index.mjs'
1212

1313
runTests(baseTests, fetch, true)

test-engine/cli.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { runTests, getResults } from './client/runner.mjs'
22
import * as display from './lib/display.mjs'
33
import { GREEN, NC } from './lib/defines.mjs'
44
import fetch from 'node-fetch-with-proxy'
5-
import tests from './tests/index.mjs'
6-
import surrogate from './tests/surrogate-control.mjs'
5+
import tests from '../tests/index.mjs'
6+
import surrogate from '../tests/surrogate-control.mjs'
77

88
tests.push(surrogate)
99

test-engine/client/config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
export let fetch = null
32
export let useBrowserCache = false
43
export let baseUrl = ''

test-engine/client/fetching.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import * as config from './config.mjs'
32
import { fixupHeader } from '../lib/header-fixup.mjs'
43

test-engine/client/runner.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import * as config from './config.mjs'
32
import { makeTest, testResults } from './test.mjs'
43

test-engine/client/test.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import * as defines from '../lib/defines.mjs'
32
import { fixupHeader } from '../lib/header-fixup.mjs'
43
import * as utils from '../lib/utils.mjs'

test-engine/client/utils.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import * as config from './config.mjs'
32
import * as utils from '../lib/utils.mjs'
43
import * as defines from '../lib/defines.mjs'

test-engine/export.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import fs from 'fs'
22

33
import Ajv from 'ajv'
44

5-
import tests from './tests/index.mjs'
6-
import surrogate from './tests/surrogate-control.mjs'
5+
import tests from '../tests/index.mjs'
6+
import surrogate from '../tests/surrogate-control.mjs'
77

88
tests.push(surrogate)
99

1010
if (process.argv[2] === 'validate') {
1111
const ajv = new Ajv()
12-
const schema = JSON.parse(fs.readFileSync('lib/testsuite-schema.json', 'utf8'))
12+
const schema = JSON.parse(fs.readFileSync('test-engine/lib/testsuite-schema.json', 'utf8'))
1313
const validate = ajv.compile(schema)
1414
const valid = validate(tests)
1515
if (!valid) {

0 commit comments

Comments
 (0)