]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/test/tap/spawn-enoent.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / test / tap / spawn-enoent.js
1 var path = require("path")
2 var test = require("tap").test
3 var fs = require("fs")
4 var rimraf = require("rimraf")
5 var mkdirp = require("mkdirp")
6 var common = require("../common-tap.js")
7
8 var pkg = path.resolve(__dirname, "spawn-enoent")
9 var pj = JSON.stringify({
10   name:"x",
11   version: "1.2.3",
12   scripts: { start: "wharble-garble-blorst" }
13 }, null, 2) + "\n"
14
15
16 test("setup", function (t) {
17   rimraf.sync(pkg)
18   mkdirp.sync(pkg)
19   fs.writeFileSync(pkg + "/package.json", pj)
20   t.end()
21 })
22
23 test("enoent script", function (t) {
24   common.npm(["start"], {
25     cwd: pkg,
26     env: {
27       PATH: process.env.PATH,
28       Path: process.env.Path,
29       "npm_config_loglevel": "warn"
30     }
31   }, function (er, code, sout, serr) {
32     t.similar(serr, /npm ERR! Failed at the x@1\.2\.3 start script 'wharble-garble-blorst'\./)
33     t.end()
34   })
35 })
36
37 test("clean", function (t) {
38   rimraf.sync(pkg)
39   t.end()
40 })