Skip to content

Commit

Permalink
use socket for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
heapwolf committed Apr 23, 2024
1 parent 4129f6f commit de3d4b4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions .npmignore
@@ -1,2 +1,3 @@
docs
types
.build
6 changes: 4 additions & 2 deletions _test/util.js
Expand Up @@ -24,5 +24,7 @@ export function html ([str, ...strings], ...values) {
return comp
}

export const qs = (s, p) => (p || document).querySelector(s)
export const qsa = (s, p) => [...(p || document).querySelectorAll(s)]
const qs = (s, p) => (p || document).querySelector(s)
const qsa = (s, p) => [...(p || document).querySelectorAll(s)]

export { qs, qsa }
6 changes: 1 addition & 5 deletions package.json
Expand Up @@ -32,10 +32,6 @@
"devDependencies": {
"@socketsupply/tonic": "15.0.0",
"standard": "16.0.4",
"tape-run": "9.0.0",
"chart.js": "^2.9.2",
"esbuild": "0.13.8",
"qsa-min": "1.0.2",
"tapzero": "^0.6.0"
"chart.js": "^2.9.2"
}
}
2 changes: 1 addition & 1 deletion router/test.js
@@ -1,5 +1,5 @@
import { test } from 'socket:test'
import { html } from '../_test/util.js'
import { Tonic } from '@socketsupply/tonic'

import { Components } from '..'

Expand Down
4 changes: 3 additions & 1 deletion socket.ini
Expand Up @@ -16,7 +16,7 @@
; vite, webpack, rollup, etc. to build your project and then copy output to
; the Socket bundle resources directory.
; default value: "src"
copy = "src"
; copy = "src"

; An ini file that maps files from the source directory to the build directory.
; copy_map = src/mapping.ini
Expand Down Expand Up @@ -61,6 +61,7 @@ importmap.json = importmap.json
node_modules = node_modules

_test/index.js = index.js
_test/util.js = _test/util.js
_test/index.html = index.html

accordion = accordion
Expand All @@ -76,6 +77,7 @@ loader = loader
panel = panel
popover = popover
profile-image = profile-image
progress-bar = progress-bar
range = range
relative-time = relative-time
router = router
Expand Down

0 comments on commit de3d4b4

Please sign in to comment.