Giter VIP home page Giter VIP logo

react-karma-webpack-testing's Introduction

react-karma-webpack-testing Build Status CircleCI

Example repository for testing React components using Karma and Webpack. Totally copies ideas from React-Router.

See the blog post here

react-karma-webpack-testing's People

Contributors

chintan9 avatar justinwoo avatar michalkononenko2 avatar thaggie avatar zealoushacker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-karma-webpack-testing's Issues

Warnings and errors when running this example

I've cloned this repo and npm installed. But when I run karma start I get following warnings:

WARN [preprocess]: Can not load "webpack", it is not registered!
  Perhaps you are missing some plugin?
WARN [preprocess]: Can not load "sourcemap", it is not registered!
  Perhaps you are missing some plugin?
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
WARN [launcher]: Can not load "Chrome", it is not registered!
  Perhaps you are missing some plugin?
INFO [Chrome 43.0.2357 (Linux 0.0.0)]: Connected on socket MzTlihDi8ejzKVYkg9-3 with id manual-3092

Then when I open the URL from console I get this error:

Chrome 43.0.2357 (Linux 0.0.0) ERROR
  Uncaught ReferenceError: require is not defined
  at /home/janusz/devel/github/react-karma-webpack-testing/tests.webpack.js:1
Chrome 43.0.2357 (Linux 0.0.0): Executed 0 of 0 ERROR (0.203 secs / 0 secs)

What could be the reason? Am I missing any setup step?

Error on npm test

Did clone -> npm install -> npm test
But I get an error

module.js:340
throw err;
^
Error: Cannot find module 'base64id'
at Function.Module._resolveFilename (module.js:
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (c:\TestExamples\KarmaWeb
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
npm ERR! Test failed. See above for more details.

Can you help ?

SyntaxError: Parse error tests.webpack.js:5941

On npm test got:

PhantomJS 1.9.8 (Windows 7 0.0.0) ERROR
  SyntaxError: Parse error
  at D:/Projects/betbull_web/tests.webpack.js:5941
PhantomJS 1.9.8 (Windows 7 0.0.0): Executed 0 of 0 ERROR (0.083 secs / 0 secs)

The Amazing debug.html

When I was reading your post I found the debug.html is amazing but you didn't mentioned how did you implement that in your post, If I what to implement that, what should I do?

THX

can't run test

$ karma start
19 12 2016 16:01:01.913:ERROR [preprocess]: Can not load "webpack", it is not registered!
Perhaps you are missing some plugin?
19 12 2016 16:01:01.917:ERROR [preprocess]: Can not load "sourcemap", it is not registered!
Perhaps you are missing some plugin?
/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:9
throw error('No provider for "' + name + '"!');
^

Error: No provider for "framework:mocha"! (Resolving: framework:mocha)
at error (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:22:12)
at Object.parent.get (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:9:13)
at get (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:54:19)
at /usr/local/lib/node_modules/karma/lib/server.js:143:20
at Array.forEach (native)
at Server._start (/usr/local/lib/node_modules/karma/lib/server.js:142:21)
at invoke (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:75:15)
at Server.start (/usr/local/lib/node_modules/karma/lib/server.js:103:18)
at Object.exports.run (/usr/local/lib/node_modules/karma/lib/cli.js:280:26)
at Object. (/usr/local/lib/node_modules/karma/bin/karma:3:23)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.