mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 05:18:39 +08:00
feat: initial angular support + clean up tests
This commit is contained in:

committed by
Nathan Walker

parent
e8888719be
commit
523f6bbef2
28
packages/webpack5/__tests__/configuration/angular.spec.ts
Normal file
28
packages/webpack5/__tests__/configuration/angular.spec.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import Config from 'webpack-chain';
|
||||
import angular from '../../src/configuration/angular';
|
||||
import { init } from '../../src';
|
||||
|
||||
jest.mock(
|
||||
'@ngtools/webpack',
|
||||
() => {
|
||||
class AngularCompilerPlugin {}
|
||||
|
||||
return {
|
||||
AngularCompilerPlugin,
|
||||
};
|
||||
},
|
||||
{ virtual: true }
|
||||
);
|
||||
|
||||
describe.only('angular configuration', () => {
|
||||
const platforms = ['ios', 'android'];
|
||||
|
||||
for (let platform of platforms) {
|
||||
it(`for ${platform}`, () => {
|
||||
init({
|
||||
[platform]: true,
|
||||
});
|
||||
expect(angular(new Config()).toString()).toMatchSnapshot();
|
||||
});
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user