Since the initial installation, the Nodejs directory is pointing to the C-drive under the user directory. All G-mounted packages are all under that directory.
However, in general, the new project will be placed in the other disk, so based on the installation of these packages, you must first boot to the directory of your project to execute the installation command (NPM install).
After installing Karma (command: npm install karma), always prompt: No provider for framework:jasmine ... Error. Backstage by the people pointing,
The initialization of the Karma (command: Karma INIT, then the carriage return).
1~ d:\workspace\javascript\karma>Karma Init2 3Which testing framework DoYou want?4 Press tab to list possible options. Enter to move to the next question.5>Jasmine6 7Does want to use Require.js?8 This would add require.js plugin.9 Press tab to list possible options. Enter to move to the next question.Ten>No One ADo you want to capture a browser automatically? -Press TAB to list possible options. Enter EmptystringTo move to the next question. ->Chrome the> - -What isThe location of your source and test files? -You can use glob patterns, eg."Js/*.js"Or"Test/**/*spec.js". +Enter EmptystringTo move to the next question. -> + AShould any of the files included by the previous patterns be excluded? atYou can use glob patterns, eg."**/*.SWP". -Enter EmptystringTo move to the next question. -> - -Do you want Karma to watch all the files and run the tests on? - Press tab to list possible options. in>Yes - toConfig file generated at"D:\workspace\javascript\karma\karma.conf.js".
Initialize Karma
Finally, install Jasmin (command: npm install karma-jasmine
).
Finally, configure the path of the test file, enter: Karma start, OK!
Karma Test Framework installation, JS compression package installation encountered problems