Skip to content

Commit

Permalink
Jasmine & Junit OK
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiBalbiani committed Jan 27, 2021
1 parent 3f8536b commit 0a2d872
Show file tree
Hide file tree
Showing 5 changed files with 304 additions and 190 deletions.
25 changes: 25 additions & 0 deletions TESTS.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<testsuite name="Chrome 87.0.4280.141 (Windows 10)" package="" timestamp="2021-01-27T08:44:13" id="0" hostname="nblx105" tests="0" errors="1" failures="0" time="0">
<properties>
<property name="browser.fullName" value="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36"/>
</properties>
<system-out>
<![CDATA[Chrome 87.0.4280.141 (Windows 10) ERROR
An error was thrown in afterAll
Uncaught ReferenceError: global is not defined
ReferenceError: global is not defined
at src/app/domain/noticias-state.model.spec.js:137:28
at src/app/domain/noticias-state.model.spec.js:151:10
,Chrome 87.0.4280.141 (Windows 10) ERROR
Disconnected Client disconnected from CONNECTED state (transport close)
,Chrome 87.0.4280.141 (Windows 10) ERROR
An error was thrown in afterAll
Uncaught ReferenceError: global is not defined
ReferenceError: global is not defined
at src/app/domain/noticias-state.model.spec.js:137:28
at src/app/domain/noticias-state.model.spec.js:151:10
]]>
</system-out>
<system-err/>
</testsuite>
17 changes: 14 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,19 @@ module.exports = function (config) {
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],

reporters: ['progress', 'junit'],

//Agrego custom config para junit.
junitReporter: {
outputDir: process.env.JUNIT_REPORT_PATH || '', // para especificar el nombre de salida de la carpeta donde se guardaran los archivos.
outputFile: process.env.JUNIT_REPORT_NAME || undefined, // para especificar el nombre de salida del archivo de reportes.
suite: '', // para especificar un nombre de paquete para la suite.
useBrowserName: false, // para agregar reportes de navegador.
nameFormatter: undefined, // function (browser, result) para personalizar el nombre de los atributos.
classNameFormatter: undefined, // function (browser, result) para personalizar el nombre de las clases.
properties: {}
},


// web server port
port: 9876,
Expand Down Expand Up @@ -70,7 +81,7 @@ module.exports = function (config) {

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false
singleRun: true
};

setWebpackPreprocessor(config, options);
Expand Down
Loading

0 comments on commit 0a2d872

Please sign in to comment.