finraos / karma-msl Goto Github PK
View Code? Open in Web Editor NEWPlugin for Karma Test Runner to integrate MSL (Mock Service Layer)
License: Apache License 2.0
Plugin for Karma Test Runner to integrate MSL (Mock Service Layer)
License: Apache License 2.0
Modify index.js to allow random setting of port number for msl server using an available port. After this is configured, auto set the proxy to point to this server.
The available port should not clash with karma web server port.
in https://github.com/FINRAOS/karma-msl/blob/master/lib/index.js, there is a line:
require('../node_modules/msl-server/web-server');
This path is wrong for the one of the projects I am working on -- it should be '../node_modules/msl-server/web-server'
. As a result, there will be a "node_modules/msl-server/web-server" not found message the first time you try to run karma. Others have reported that uninstalling and reinstalling modules fixes the problem, but this is the root cause (I don't know how reinstallling fixes this).
The current code seems very dependent on whether modules are installed locally or globally. That's a bad idea. If the web-server configuration is project-specific and not generic, then it should be separate, not part of the module itself, and its location passed in as a parameter. Also, referencing a local module should be done according to http://www.bennadel.com/blog/2169-where-does-node-js-and-require-look-for-modules.htm (I haven't tried this myself).
Update plugin to use the latest msl browser client with the following PR included:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.