]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/read-package-json/test/non-json.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / read-package-json / test / non-json.js
1 var path = require('path')
2
3 var tap = require('tap')
4
5 var readJson = require('../')
6
7 var expect = {
8   name: 'read-package-json',
9   version: '0.1.1',
10   author: {
11     name: 'Isaac Z. Schlueter',
12     email: 'i@izs.me',
13     url: 'http://blog.izs.me/'
14   },
15   description: 'The thing npm uses to read package.json files with semantics and defaults and validation',
16   repository: {
17     type: 'git',
18     url: 'git://github.com/isaacs/read-package-json.git'
19   },
20   bugs: {
21     url: 'https://github.com/isaacs/read-package-json/issues'
22   },
23   main: 'read-json.js',
24   scripts: { test: 'tap test/*.js' },
25   dependencies: {
26     glob: '~3.1.9',
27     'lru-cache': '~1.1.0',
28     semver: '~1.0.14',
29     slide: '~1.1.3',
30     npmlog: '0',
31     'graceful-fs': '~1.1.8'
32   },
33   devDependencies: { tap: '~0.2.5' },
34   homepage: 'https://github.com/isaacs/read-package-json#readme',
35   optionalDependencies: { npmlog: '0', 'graceful-fs': '~1.1.8' },
36   _id: 'read-package-json@0.1.1',
37   readme: 'ERROR: No README data found!'
38 }
39
40 tap.test('from css', function (t) {
41   var c = path.join(__dirname, 'fixtures', 'not-json.css')
42   readJson(c, function (er, d) {
43     t.same(d, expect)
44     t.end()
45   })
46 })
47
48 tap.test('from js', function (t) {
49   readJson(__filename, function (er, d) {
50     t.same(d, expect)
51     t.end()
52   })
53 })
54
55 /**package
56 {
57   "name": "read-package-json",
58   "version": "0.1.1",
59   "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
60   "description": "The thing npm uses to read package.json files with semantics and defaults and validation",
61   "repository": {
62     "type": "git",
63     "url": "git://github.com/isaacs/read-package-json.git"
64   },
65   "main": "read-json.js",
66   "scripts": {
67     "test": "tap test/*.js"
68   },
69   "dependencies": {
70     "glob": "~3.1.9",
71     "lru-cache": "~1.1.0",
72     "semver": "~1.0.14",
73     "slide": "~1.1.3"
74   },
75   "devDependencies": {
76     "tap": "~0.2.5"
77   },
78   "optionalDependencies": {
79     "npmlog": "0",
80     "graceful-fs": "~1.1.8"
81   }
82 }
83 **/