mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 22:01:42 +08:00
feat(webpack): default tsconfig.json if not found
This commit is contained in:
@ -1,11 +1,25 @@
|
||||
import Config from 'webpack-chain';
|
||||
|
||||
import {
|
||||
mockExistsSync,
|
||||
restoreExistsSync,
|
||||
setHasTSConfig,
|
||||
} from '../../scripts/jest.utils';
|
||||
|
||||
import vue from '../../src/configuration/vue';
|
||||
import { init } from '../../src';
|
||||
|
||||
describe('vue configuration', () => {
|
||||
const platforms = ['ios', 'android'];
|
||||
|
||||
beforeAll(() => {
|
||||
mockExistsSync();
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
restoreExistsSync();
|
||||
});
|
||||
|
||||
for (let platform of platforms) {
|
||||
it(`for ${platform}`, () => {
|
||||
init({
|
||||
@ -14,4 +28,23 @@ describe('vue configuration', () => {
|
||||
expect(vue(new Config()).toString()).toMatchSnapshot();
|
||||
});
|
||||
}
|
||||
|
||||
describe('with typescript', () => {
|
||||
beforeAll(() => {
|
||||
setHasTSConfig(true);
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
setHasTSConfig(false);
|
||||
});
|
||||
|
||||
for (let platform of platforms) {
|
||||
it(`for ${platform}`, () => {
|
||||
init({
|
||||
[platform]: true,
|
||||
});
|
||||
expect(vue(new Config()).toString()).toMatchSnapshot();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user