Skip to content

Commit

Permalink
add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Jun 27, 2024
1 parent ad95222 commit 0b0ba19
Show file tree
Hide file tree
Showing 5 changed files with 582 additions and 21 deletions.
18 changes: 14 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@
"exports": {
".": {
"import": "./internal/stencil-core/index.js",
"require": "./internal/stencil-core/index.cjs"
"require": "./internal/stencil-core/index.cjs",
"types": "./internal/stencil-core/index.d.ts"
},
"./cli": {
"import": "./cli/index.js",
"require": "./cli/index.cjs"
},
"./internal": {
"import": "./internal/index.js"
"import": "./internal/index.js",
"types": "./internal/index.d.ts"
},
"./internal/client": {
"import": "./internal/client/index.js"
Expand All @@ -45,14 +47,22 @@
},
"./internal/app-data": {
"import": "./internal/app-data/index.js",
"require": "./internal/app-data/index.cjs"
"require": "./internal/app-data/index.cjs",
"types": "./internal/app-data/index.d.ts"
},
"./mock-doc": {
"import": "./mock-doc/index.js",
"require": "./mock-doc/index.cjs",
"types": "./mock-doc/index.d.ts"
},
"./mock-doc": {
"import": "./mock-doc/index.js",
"require": "./mock-doc/index.cjs"
},
"./compiler": {
"import": "./compiler/stencil.js"
"import": "./compiler/stencil.js",
"require": "./compiler/stencil.js",
"types": "./compiler/stencil.d.ts"
},
"./compiler/*": {
"import": "./compiler/*"
Expand Down
13 changes: 13 additions & 0 deletions test/end-to-end/exportMap/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const assert = require('node:assert')

const { version } = require('@stencil/core/compiler')
const { run } = require('@stencil/core/cli')
const { h } = require('@stencil/core')
const { MockDocument } = require('@stencil/core/mock-doc')
const appData = require('@stencil/core/internal/app-data')

assert(typeof version === 'string')
assert(typeof run, 'function')
assert(typeof h === 'function')
assert(typeof MockDocument === 'function')
assert(Object.keys(appData).length === 3)
18 changes: 18 additions & 0 deletions test/end-to-end/exportMap/index.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import assert from 'node:assert'

import { run } from '@stencil/core/cli'
import { version } from '@stencil/core/compiler'
import { MockDocument } from '@stencil/core/mock-doc';
import type { BuildConditionals } from '@stencil/core/internal';
import { BUILD } from '@stencil/core/internal/app-data'
import * as foo from '@stencil/core/internal/client'

assert(typeof version === 'string')
version.slice()
BUILD as BuildConditionals

assert(typeof run, 'function')
run.call

assert(typeof MockDocument === 'function')
assert(typeof BUILD !== 'undefined')
Loading

0 comments on commit 0b0ba19

Please sign in to comment.