]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/init-package-json/test/scope-in-config.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / init-package-json / test / scope-in-config.js
diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/init-package-json/test/scope-in-config.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/init-package-json/test/scope-in-config.js
new file mode 100644 (file)
index 0000000..32bba16
--- /dev/null
@@ -0,0 +1,33 @@
+var fs = require('fs')
+var path = require('path')
+
+var rimraf = require('rimraf')
+var tap = require('tap')
+
+var init = require('../')
+
+var EXPECT = {
+    name: '@scoped/test',
+    version: '1.0.0',
+    description: '',
+    author: '',
+    scripts: { test: 'echo \"Error: no test specified\" && exit 1' },
+    main: 'basic.js',
+    keywords: [],
+    license: 'ISC'
+}
+
+tap.test('--yes with scope', function (t) {
+  init(__dirname, __dirname, { yes: 'yes', scope: '@scoped' }, function (er, data) {
+    if (er) throw er
+
+    console.log('')
+    t.has(data, EXPECT)
+    t.end()
+  })
+})
+
+tap.test('teardown', function (t) {
+  rimraf.sync(path.join(__dirname, 'package.json'))
+  t.end()
+})