Permalink
Browse files

tests: use a fixture for tests

  • Loading branch information...
1 parent e7caad8 commit 336d936894c916f0247fcc1fd0e710a0855250f7 @robertkowalski robertkowalski committed with domenic Feb 26, 2014
Showing with 29 additions and 3 deletions.
  1. +1 −1 test/basic.js
  2. +1 −1 test/dev.js
  3. +26 −0 test/fixtures/package.json
  4. +1 −1 test/noargs.js
View
@@ -1,5 +1,5 @@
var readInstalled = require("../read-installed.js")
-var json = require("../package.json")
+var json = require("./fixtures/package.json")
var known = [].concat(Object.keys(json.dependencies)
, Object.keys(json.optionalDependencies)
, Object.keys(json.devDependencies)).sort()
View
@@ -1,6 +1,6 @@
var readInstalled = require("../read-installed.js")
var test = require("tap").test
-var json = require("../package.json")
+var json = require("./fixtures/package.json")
var path = require("path")
var known = [].concat(Object.keys(json.dependencies)
, Object.keys(json.optionalDependencies)
View
@@ -0,0 +1,26 @@
+{
+ "name": "read-installed",
+ "description": "Read all the installed packages in a folder, and return a tree structure with all the data.",
+ "version": "1.0.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/read-installed"
+ },
+ "main": "read-installed.js",
+ "scripts": {
+ "test": "tap ./test/"
+ },
+ "dependencies": {
+ "semver": "2",
+ "slide": "~1.1.3",
+ "read-package-json": "1"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "~2"
+ },
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
+ "license": "ISC",
+ "devDependencies": {
+ "tap": "~0.4.8"
+ }
+}
View
@@ -1,6 +1,6 @@
var readInstalled = require("../read-installed.js")
var test = require("tap").test
-var json = require("../package.json")
+var json = require("./fixtures/package.json")
var path = require("path")
var known = [].concat(Object.keys(json.dependencies)
, Object.keys(json.optionalDependencies)

0 comments on commit 336d936

Please sign in to comment.