mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 05:18:39 +08:00
29 lines
608 B
TypeScript
29 lines
608 B
TypeScript
// @ts-ignore
|
|
import Config from 'webpack-chain';
|
|
import react from '../../src/configuration/react';
|
|
|
|
describe('react configuration', () => {
|
|
const platforms = ['ios', 'android'];
|
|
|
|
for (let platform of platforms) {
|
|
describe(`> ${platform} >`, () => {
|
|
it(`base config`, () => {
|
|
expect(
|
|
react(new Config(), {
|
|
[platform]: true,
|
|
}).toString()
|
|
).toMatchSnapshot();
|
|
});
|
|
|
|
it(`adds ReactRefreshWebpackPlugin when HMR enabled`, () => {
|
|
expect(
|
|
react(new Config(), {
|
|
[platform]: true,
|
|
hmr: true,
|
|
}).toString()
|
|
).toMatchSnapshot();
|
|
});
|
|
});
|
|
}
|
|
});
|