]> gerrit.simantics Code Review - simantics/district.git/blob - 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
1 var fs = require('fs')
2 var path = require('path')
3
4 var rimraf = require('rimraf')
5 var tap = require('tap')
6
7 var init = require('../')
8
9 var EXPECT = {
10     name: '@scoped/test',
11     version: '1.0.0',
12     description: '',
13     author: '',
14     scripts: { test: 'echo \"Error: no test specified\" && exit 1' },
15     main: 'basic.js',
16     keywords: [],
17     license: 'ISC'
18 }
19
20 tap.test('--yes with scope', function (t) {
21   init(__dirname, __dirname, { yes: 'yes', scope: '@scoped' }, function (er, data) {
22     if (er) throw er
23
24     console.log('')
25     t.has(data, EXPECT)
26     t.end()
27   })
28 })
29
30 tap.test('teardown', function (t) {
31   rimraf.sync(path.join(__dirname, 'package.json'))
32   t.end()
33 })