Skip to content

Commit

Permalink
Add test case for #286
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Nov 11, 2020
1 parent 3c15b7d commit 7ce64a9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/index.js
Expand Up @@ -517,6 +517,27 @@ describe('hyperlink', function () {
});
});
});

it('should handle a JavaScript import', async function () {
const t = new TapRender();
sinon.spy(t, 'push');
await hyperlink(
{
recursive: false,
root: pathModule.resolve(__dirname, '..', 'testdata', 'import'),
inputUrls: ['index.html'],
},
t
);

expect(t.close(), 'to satisfy', {
count: 4,
pass: 4,
fail: 0,
skip: 0,
todo: 0,
});
});
});

describe('with document fragments', function () {
Expand Down
4 changes: 4 additions & 0 deletions testdata/import/index.html
@@ -0,0 +1,4 @@
<script type="module">
import { h, Component, render } from 'https://unpkg.com/preact?module';
// ...
</script>

0 comments on commit 7ce64a9

Please sign in to comment.