]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/npm-install-checks/test/check-git.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / npm-install-checks / test / check-git.js
1 var test = require("tap").test
2 var c = require("../index.js").checkGit
3 var fs = require("fs")
4 var rimraf = require("rimraf")
5 var mkdirp = require("mkdirp")
6 var path = require("path")
7 var gitFixturePath = path.resolve(__dirname, "out")
8
9 test("is .git repo", function (t) {
10   mkdirp(gitFixturePath + "/.git", function () {
11     c(gitFixturePath, function (err) {
12       t.ok(err, "error present")
13       t.equal(err.code, "EISGIT")
14       t.end()
15     })
16   })
17 })
18
19 test("is not a .git repo", function (t) {
20   c(__dirname, function (err) {
21     t.notOk(err, "error not present")
22     t.end()
23   })
24 })
25
26 test("cleanup", function (t) {
27   rimraf(gitFixturePath, function () {
28     t.pass("cleanup")
29     t.end()
30   })
31 })