Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Invalid store [fslookup], allowed values are #76

Open
Raathigesh opened this issue Jul 15, 2016 · 0 comments
Open

Error: Invalid store [fslookup], allowed values are #76

Raathigesh opened this issue Jul 15, 2016 · 0 comments

Comments

@Raathigesh
Copy link

I'm trying to get the coverage configured for a React + Typescript + Webpack project. I'm following the instruction from here. But when Html report is configured in remap-instalbul, the following error occurs.

Any pointers would be helpful.

Error: Invalid store [fslookup], allowed values are
    at Object.Factory.create (E:\APPS\node_modules\remap-istanbul\node_modules\istanbul\lib\util\factory.js:47:28)
    at new HtmlReport (E:\APPS\node_modules\remap-istanbul\node_modules\istanbul\lib\report\html.js:350:15)
    at E:\APPS\node_modules\remap-istanbul\lib\writeReport.js:76:20
    at E:\APPS\node_modules\amdefine\amdefine.js:125:34
    at nextTickCallbackWith0Args (node.js:453:9)
    at process._tickCallback (node.js:382:13)

Karma config with Webpack configuration:

module.exports = function (config) {
  config.set({
    basePath: '',
    frameworks: ['mocha', 'chai', 'sinon', 'source-map-support'],
    files: [
      './shell/apps/**/*.spec.tsx'
    ],
    plugins: ["karma-*"],
    preprocessors: {
      './shell/apps/**/.tsx': ['webpack', 'sourcemap', 'coverage'],
      './shell/apps/**/*.spec.tsx': ['webpack']
    },
    webpack: {
      devtool: 'inline-source-map',
      module: {
        loaders: [
          {
            test: /\.(ts|tsx)$/,
            exclude: /node_modules/,
            loader: 'awesome-typescript-loader'
          },
          {
            test: /\.json$/,
            loader: 'json'
          },
          {
            test: /\.((woff2?|svg)(\?v=[0-9]\.[0-9]\.[0-9]))|(woff2?|svg|jpe?g|png|gif|ico)$/,
            loader: 'url?limit=10000'
          }
        ],
        postLoaders: [
          /**
           * Instruments TS source files for subsequent code coverage.
           * See https://github.com/deepsweet/istanbul-instrumenter-loader
           */
          {
            test: /\.(ts|tsx)$/,
            loader: 'istanbul-instrumenter-loader',
            exclude: [
              /node_modules/,
              /tests/,
              /\.(e2e|spec)\.tsx$/
            ]
          }
        ]
      },
      resolve: {
        //Added .json extension required by cheerio (enzyme dependency)
        extensions: ['', '.js', '.ts', '.tsx', '.json']
      },
      //Configuration required by enzyme
      externals: {
        'react/lib/ExecutionEnvironment': true,
        'react/lib/ReactContext': 'window',
        'cheerio': 'window',
        'react/addons': true,
      }
    },
    /**
     * Make dev server silent.
     */
    webpackServer: { noInfo: true },
    reporters: ['progress', 'coverage', 'karma-remap-istanbul'],
    /**
     * Simple summary (printed to the console) and JSON file which we will remap back to TypeScript.
     */
    coverageReporter: {
      dir: 'coverage',
      reporters: [
        { type: 'text-summary' },
        {
          type: 'json',
          subdir: '.',
          file: 'coverage-final.json'
        }
      ]
    },

    /**
     * Map code coverage result back to TypeScript using `karma-remap-istanbul`.
     */
    remapIstanbulReporter: {
      src: 'coverage/coverage-final.json',
      reports: {
        lcovonly: 'coverage/lcov.info',
        html: 'coverage/report'
      },
      timeoutNotCreated: 5000,
      timeoutNoMoreFiles: 5000
    },
    port: 9876,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['PhantomJS'],
    singleRun: true,
    concurrency: Infinity,
    client: {
      captureConsole: true
    }
  })
}
@dylans dylans added the question label Nov 1, 2016
@dylans dylans added this to the 0.9.0 milestone Jan 11, 2017
@dylans dylans modified the milestones: 0.9.0, 0.10.0 Feb 22, 2017
@dylans dylans removed this from the 0.10.0 milestone Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants