Skip to content
This repository has been archived by the owner on Aug 7, 2020. It is now read-only.

Not generating coverage for all files #136

Open
golfreak923 opened this issue Nov 18, 2015 · 0 comments
Open

Not generating coverage for all files #136

golfreak923 opened this issue Nov 18, 2015 · 0 comments

Comments

@golfreak923
Copy link

I'm only seeing coverage for files that have any coverage (i.e. > 0%). Files with no coverage are not showing up at all in the coverage report. I've played with the sourcesToPreload configuration but cannot seem to get saga to see all of my source files--not just those that have some coverage. I'm running jasmine-maven-plugin version 2.0 and saga-maven-plugin version 1.5.5. Below is my pom snippet:

<plugin>
    <groupId>com.github.searls</groupId>
    <artifactId>jasmine-maven-plugin</artifactId>
    <version>${jasmine-maven-plugin-version}</version>
    <extensions>true</extensions>
    <executions>
        <execution>
            <goals>
                <goal>test</goal>
            </goals>
            <phase>test</phase>
            <configuration>
                <keepServerAlive>true</keepServerAlive>
            </configuration>
        </execution>
    </executions>
    <configuration>
        <keepServerAlive>true</keepServerAlive>
        <jsSrcDir>${project.basedir}/src/main/webapp/js/</jsSrcDir>
        <jsTestSrcDir>${project.basedir}/src/test/javascript/</jsTestSrcDir>
        <preloadSources>
            <include>lib/require.js</include>
        </preloadSources>
        <specRunnerTemplate>REQUIRE_JS</specRunnerTemplate>
    </configuration>
</plugin>
<plugin>
    <groupId>com.github.timurstrekalov</groupId>
    <artifactId>saga-maven-plugin</artifactId>
    <version>${saga-maven-plugin-version}</version>
    <executions>
        <execution>
            <phase>verify</phase>
            <goals>
                <goal>coverage</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <baseDir>http://localhost:${jasmine.serverPort}</baseDir>
        <outputDir>${project.basedir}/src/main/webapp/js/coverage</outputDir>
        <noInstrumentPatterns>
            <pattern>.*/spec/.*</pattern>
            <pattern>.*\/lib\/.*\.js</pattern>
            <pattern>.*\/webjars\/jasmine\/.*\.js</pattern>
        </noInstrumentPatterns>
        <outputStrategy>BOTH</outputStrategy>
        <sortBy>file</sortBy>
    </configuration>
</plugin>

Any help will be much appreciated!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant