Skip to content

Commit a3303e6

Browse files
authored
add primitive test assertions (#196)
1 parent 83e91a9 commit a3303e6

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jobs:
2222
- name: build
2323
run: npm i && npm run build
2424

25+
- name: primitive test
26+
run: npm run test
27+
2528
- name: install lhci
2629
run: npm install @lhci/cli@latest
2730

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
"search.exclude": {
4+
"devtools-protocol/**": true,
5+
"bower_components/**": true
6+
}
7+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"scripts": {
2121
"build": "rimraf devtools-protocol/ && node -r esm node_modules/.bin/eleventy && rollup -c rollup.config.js",
2222
"prep": "bash prep-tot-protocol-files.sh",
23+
"test": "bash test/primitive_tests.sh",
2324
"serve": "echo 'Open http://localhost:8696/devtools-protocol/ for built site'; statikk --port 8696 ."
2425
}
2526
}

test/primitive_tests.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
set -euxo pipefail
3+
4+
local_script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5+
build_dp_path=$local_script_path/../devtools-protocol
6+
7+
# v lame assertions
8+
cat $build_dp_path/index.html | grep DOMSnapshot
9+
cat $build_dp_path/tot/Page/index.html | grep --no-messages navigateToHistoryEntry
10+
11+
stat $build_dp_path/search_index/v8.json
12+
stat $build_dp_path/search_index/tot.json
13+
14+
echo "assertions passed ✅"

0 commit comments

Comments
 (0)