Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move some sh tests to js

  • Loading branch information...
commit 38a9453bf6fb89b1c68720389fb4d1e2fc0d91bd 1 parent 5e7fa91
@isaacs isaacs authored
View
1  test/packages/npm-test-bundled-git/package.json
@@ -1,4 +1,5 @@
{"name":"npm-test-bundled-git"
+,"scripts":{"test":"node test.js"}
,"version":"1.2.5"
,"dependencies":{"glob":"git://github.com/isaacs/node-glob.git#npm-test"}
,"bundledDependencies":["glob"]}
View
4 test/packages/npm-test-bundled-git/test.js
@@ -0,0 +1,4 @@
+var a = require("./node_modules/glob/node_modules/minimatch/package.json")
+var e = require("./minimatch-expected.json")
+var assert = require("assert")
+assert.deepEqual(a, e, "didn't get expected minimatch/package.json")
View
9 test/packages/npm-test-bundled-git/test.sh
@@ -1,9 +0,0 @@
-#!/usr/bin/bash
-
-d=$(diff node_modules/glob/node_modules/minimatch/package.json minimatch-expected.json)
-
-if [ "$d" != "" ]; then
- echo "didn't get expected minimatch/package.json" >&2
- echo "$d" >&2
- exit 1
-fi
View
9 test/packages/npm-test-env-reader/test.js
@@ -0,0 +1,9 @@
+var envs = []
+for (var e in path.env) {
+ if (e.match(/npm|^path$/i)) envs.push(e + '=' + path.env[e])
+}
+envs.sort(function (a, b) {
+ return a === b ? 0 : a > b ? -1 : 1
+}).forEach(function (e) {
+ console.log(e)
+})
View
3  test/packages/npm-test-env-reader/test.sh
@@ -1,3 +0,0 @@
-#!/usr/bin/env sh
-env | grep npm | sort | uniq
-echo PATH=$PATH
Please sign in to comment.
Something went wrong with that request. Please try again.