Karma Test Framework installation, JS compression package installation encountered problems

Source: Internet
Author: User
Tags glob

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.