mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 13:51:27 +08:00
51 lines
895 B
TypeScript
51 lines
895 B
TypeScript
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({
|
|
[platform]: true,
|
|
});
|
|
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();
|
|
});
|
|
}
|
|
});
|
|
});
|