Skip to content

Commit a29842d

Browse files
author
Alain Boudard
committed
fix: config maven for npm test
1 parent 94f7470 commit a29842d

File tree

4 files changed

+47
-5
lines changed

4 files changed

+47
-5
lines changed

application/ng-shell/karma.conf.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ module.exports = function (config) {
2828
dir: require('path').join(__dirname, './coverage/ng-shell'),
2929
subdir: '.',
3030
reporters: [
31-
{type: 'html'},
32-
{type: 'text-summary'}
31+
{type: 'lcov'}
3332
]
3433
},
3534
reporters: ['mocha'],

application/ng-shell/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"start": "ng serve",
77
"build:shell": "ng build --base-href /ng-shell/ --configuration production",
88
"watch:shell": "ng build --base-href /ng-shell/ --watch --configuration development",
9-
"test": "ng test --watch=false --code-coverage",
9+
"test": "ng test --watch=false --code-coverage --browsers=ChromeHeadless",
1010
"lint": "ng lint",
1111
"run:all": "node node_modules/@angular-architects/module-federation/src/server/mf-dev-server.js"
1212
},

application/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "application",
3+
"version": "0.0.0",
4+
"scripts": {
5+
"build": "cd ng-shell && npm run build",
6+
"install": "cd ng-shell && npm install --no-save",
7+
"test": "cd ng-shell && npm run test"
8+
}
9+
}

application/pom.xml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
66
<groupId>org.springframework.boot</groupId>
@@ -43,6 +43,40 @@
4343
<groupId>org.springframework.boot</groupId>
4444
<artifactId>spring-boot-maven-plugin</artifactId>
4545
</plugin>
46+
<plugin>
47+
<groupId>org.codehaus.mojo</groupId>
48+
<artifactId>exec-maven-plugin</artifactId>
49+
<executions>
50+
<execution>
51+
<id>npm-install</id>
52+
<phase>initialize</phase>
53+
<goals>
54+
<goal>exec</goal>
55+
</goals>
56+
<configuration>
57+
<executable>npm</executable>
58+
<arguments>
59+
<argument>run</argument>
60+
<argument>install</argument>
61+
</arguments>
62+
</configuration>
63+
</execution>
64+
<execution>
65+
<id>npm-build</id>
66+
<phase>compile</phase>
67+
<goals>
68+
<goal>exec</goal>
69+
</goals>
70+
<configuration>
71+
<executable>npm</executable>
72+
<arguments>
73+
<argument>run</argument>
74+
<argument>test</argument>
75+
</arguments>
76+
</configuration>
77+
</execution>
78+
</executions>
79+
</plugin>
4680
</plugins>
4781
</build>
4882

0 commit comments

Comments
 (0)