Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js jestjs的npm脚本_Node.js_Npm_Jestjs - Fatal编程技术网

Node.js jestjs的npm脚本

Node.js jestjs的npm脚本,node.js,npm,jestjs,Node.js,Npm,Jestjs,我试图用jestjs运行测试,但我很难做到这一点 运行此命令时: npm testj npm说我没有这个脚本: $npm testj Usage: npm <command> where <command> is one of: access, add-user, .... npm <cmd> -h quick help on <cmd> npm -l display full usage info npm

我试图用jestjs运行测试,但我很难做到这一点

运行此命令时:

npm testj
npm说我没有这个脚本:

$npm testj

Usage: npm <command>

where <command> is one of:
    access, add-user, ....

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm faq          commonly asked questions
npm help <term>  search for help on <term>
npm help npm     involved overview

Specify configs in the ini-formatted file:
    /Users/bli1/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

npm@2.13.1 /usr/local/lib/node_modules/npm
preprocessor.js

var ReactTools = require('react-tools');

module.exports = {
    process: function(src) {
        return ReactTools.transform(src);
    }
};

也许您需要
npm运行testj

只有少数脚本具有速记功能,如
npm-test

var ReactTools = require('react-tools');

module.exports = {
    process: function(src) {
        return ReactTools.transform(src);
    }
};