Skip to content

Commit

Permalink
add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
nichoth committed Sep 28, 2024
1 parent c49649d commit 4df3f36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<input id="test-input" type="text" />
</form>

<div id="id-test">testing the ID attribute</div>

<script src="/test-bundle.js"></script>
</body>
</html>
8 changes: 7 additions & 1 deletion test/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { dom, qs, waitForText, type } from '../src/index.js'
import { byId, dom, qs, waitForText, type } from '../src/index.js'
import { test } from '@bicycle-codes/tapzero'
import { Terminal } from 'xterm'

test('byId', t => {
t.plan(1)
const el = byId('id-test')
t.ok(el, 'should get an element by ID')
})

test('dom.waitFor', async t => {
const p = document.createElement('p')
p.textContent = 'testing'
Expand Down

0 comments on commit 4df3f36

Please sign in to comment.