]> git.r.bdr.sh - rbdr/dotfiles/blame_incremental - atom/packages/pretty-json/node_modules/jsonminify/test/test-minify.json.js
Remove easymotion plugin
[rbdr/dotfiles] / atom / packages / pretty-json / node_modules / jsonminify / test / test-minify.json.js
... / ...
CommitLineData
1var fs = require('fs');
2
3var should = require('should');
4
5require('../minify.json.js');
6
7describe('JSON.minify', function() {
8 it('define', function() {
9 JSON.minify.should.be.ok;
10 });
11 it('in-memory string', function() {
12 var json = '{"key":"value"}';
13 var res = JSON.minify(json);
14 JSON.parse(res).key.should.equal('value');
15 });
16 it('comment.json', function() {
17 var json = fs.readFileSync(__dirname + '/comment.json', 'utf8');
18 var res = JSON.parse(JSON.minify(json));
19 res.foo.should.equal('bar');
20 });
21 it('comment.json', function() {
22 var json = fs.readFileSync(__dirname + '/plain.json', 'utf8');
23 var res = JSON.parse(JSON.minify(json));
24 res.foo.should.equal('bar');
25 });
26});