-
Notifications
You must be signed in to change notification settings - Fork 792
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(test): transitive module dependencies with js extensions will be …
…processed
- Loading branch information
1 parent
85f6504
commit 781180d
Showing
18 changed files
with
217 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "@stencil/jest-spec-runner", | ||
"private": true, | ||
"scripts": { | ||
"build": "node ../../bin/stencil build", | ||
"test": "node ../../bin/stencil test --spec" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* eslint-disable */ | ||
/* tslint:disable */ | ||
/** | ||
* This is an autogenerated file created by the Stencil compiler. | ||
* It contains typing information for all components that exist in this project. | ||
*/ | ||
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal"; | ||
export namespace Components { | ||
interface MyMixed { | ||
} | ||
interface MySimple { | ||
} | ||
} | ||
declare global { | ||
interface HTMLMyMixedElement extends Components.MyMixed, HTMLStencilElement { | ||
} | ||
var HTMLMyMixedElement: { | ||
prototype: HTMLMyMixedElement; | ||
new (): HTMLMyMixedElement; | ||
}; | ||
interface HTMLMySimpleElement extends Components.MySimple, HTMLStencilElement { | ||
} | ||
var HTMLMySimpleElement: { | ||
prototype: HTMLMySimpleElement; | ||
new (): HTMLMySimpleElement; | ||
}; | ||
interface HTMLElementTagNameMap { | ||
"my-mixed": HTMLMyMixedElement; | ||
"my-simple": HTMLMySimpleElement; | ||
} | ||
} | ||
declare namespace LocalJSX { | ||
interface MyMixed { | ||
} | ||
interface MySimple { | ||
} | ||
interface IntrinsicElements { | ||
"my-mixed": MyMixed; | ||
"my-simple": MySimple; | ||
} | ||
} | ||
export { LocalJSX as JSX }; | ||
declare module "@stencil/core" { | ||
export namespace JSX { | ||
interface IntrinsicElements { | ||
"my-mixed": LocalJSX.MyMixed & JSXBase.HTMLAttributes<HTMLMyMixedElement>; | ||
"my-simple": LocalJSX.MySimple & JSXBase.HTMLAttributes<HTMLMySimpleElement>; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { newSpecPage } from '@stencil/core/testing'; | ||
import { MyMixed } from './mixed'; | ||
|
||
describe('my-mixed', () => { | ||
it('renders', async () => { | ||
const page = await newSpecPage({ | ||
components: [MyMixed], | ||
html: '<my-mixed></my-mixed>', | ||
}); | ||
expect(page.root).toEqualHtml(` | ||
<my-mixed> | ||
<span id="esm"> | ||
deep esm!deep ts! | ||
</span> | ||
<span id="cjs"> | ||
deep cjs!deep ts! | ||
</span> | ||
<span id="ts"> | ||
deep esm!deep ts! | ||
</span> | ||
</my-mixed> | ||
`); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// @ts-nocheck | ||
import { Component, Host, h } from '@stencil/core'; | ||
import deepEsm from '../utils/as-js-esm'; | ||
import deepCjs from '../utils/as-js-cjs'; | ||
import deepTs from '../utils/as-ts'; | ||
|
||
@Component({ | ||
tag: 'my-mixed', | ||
shadow: false, | ||
}) | ||
export class MyMixed { | ||
render() { | ||
return ( | ||
<Host> | ||
<span id="esm">{deepEsm()}</span> | ||
<span id="cjs">{deepCjs()}</span> | ||
<span id="ts">{deepTs()}</span> | ||
</Host> | ||
); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
test/jest-spec-runner/src/components/simple/simple.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { newSpecPage } from '@stencil/core/testing'; | ||
import { MySimple } from './simple'; | ||
|
||
describe('my-simple', () => { | ||
it('renders', async () => { | ||
const page = await newSpecPage({ | ||
components: [MySimple], | ||
html: '<my-simple></my-simple>', | ||
}); | ||
expect(page.root).toEqualHtml(` | ||
<my-simple> | ||
<span> | ||
simple! | ||
</span> | ||
</my-simple> | ||
`); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Component, h } from '@stencil/core'; | ||
|
||
@Component({ | ||
tag: 'my-simple', | ||
shadow: false, | ||
}) | ||
export class MySimple { | ||
render() { | ||
return <span>simple!</span>; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
const { deep: js } = require('./deep-js-cjs'); | ||
const { deep: ts } = require('./deep-ts'); | ||
|
||
export default () => [js, ts]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { deep as js } from './deep-js-esm'; | ||
import { deep as ts } from './deep-ts'; | ||
|
||
export default () => [js, ts]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { deep as js } from './deep-js-esm'; | ||
import { deep as ts } from './deep-ts'; | ||
import { deep as mjs } from './deep-mjs'; | ||
|
||
export default () => [js, ts, mjs]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { deep as js } from './deep-js-esm'; | ||
import { deep as ts } from './deep-ts'; | ||
|
||
export default () => [js, ts]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const deep = 'deep cjs!'; | ||
|
||
exports.deep = deep; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const deep = 'deep esm!'; | ||
|
||
export { deep }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const deep = 'deep mjs!'; | ||
|
||
export { deep }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const deep = 'deep ts!'; | ||
|
||
export { deep }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Config } from '../../internal'; | ||
|
||
export const config: Config = { | ||
outputTargets: [ | ||
{ | ||
type: 'dist-custom-elements-bundle', | ||
}, | ||
], | ||
hashFileNames: false, | ||
hydratedFlag: null, | ||
extras: { | ||
cssVarsShim: false, | ||
dynamicImportShim: false, | ||
safari10: false, | ||
scriptDataOpts: false, | ||
shadowDomShim: false, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// hey! comments in my tsconfig!! | ||
{ | ||
"compilerOptions": { | ||
"alwaysStrict": true, | ||
"allowSyntheticDefaultImports": true, | ||
"allowUnreachableCode": false, | ||
"declaration": true, | ||
"experimentalDecorators": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"jsx": "react", | ||
"jsxFactory": "h", | ||
"lib": ["dom", "es2017"], | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
// turning this off to see what happens when people are more lax. | ||
"noImplicitAny": false, | ||
"noImplicitReturns": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"pretty": true, | ||
"target": "es2017", | ||
"baseUrl": ".", | ||
"paths": { | ||
"@stencil/core": ["../../internal"], | ||
"@stencil/core/internal": ["../../internal"], | ||
"@stencil/core/testing": ["../../testing"] | ||
} | ||
}, | ||
"include": ["src"] | ||
} |