Skip to content

Commit f4bec0a

Browse files
authored
Add a couple basic assertions to the dist output
1 parent dbba970 commit f4bec0a

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

test/fixtures/esm/index.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
import "htm";
2-
import "htm/preact";
3-
import "htm/preact/standalone";
4-
// TODOD: Enable once react distro is ESM compatible.
5-
// import "htm/react";
1+
import assert from 'assert';
2+
import htm from 'htm';
3+
import * as preact from 'htm/preact';
4+
import * as standalone from 'htm/preact/standalone';
5+
// TODO: Enable once react distro is ESM compatible.
6+
// import * as react 'htm/react';
7+
8+
assert(typeof htm === 'function', 'import htm from "htm"');
9+
10+
assert(typeof preact.html === 'function', 'import { html } from "preact"');
11+
12+
assert(typeof standalone.html === 'function', 'import { html } from "preact/standalone"');
13+
14+
console.log('✅ Dist Tests Passed');

0 commit comments

Comments
 (0)