mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
Changes
This commit is contained in:
56
node_modules/eyes/test/eyes-test.js
generated
vendored
Normal file
56
node_modules/eyes/test/eyes-test.js
generated
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
var util = require('util');
|
||||
var eyes = require('../lib/eyes');
|
||||
|
||||
eyes.inspect({
|
||||
number: 42,
|
||||
string: "John Galt",
|
||||
regexp: /[a-z]+/,
|
||||
array: [99, 168, 'x', {}],
|
||||
func: function () {},
|
||||
bool: false,
|
||||
nil: null,
|
||||
undef: undefined,
|
||||
object: {attr: []}
|
||||
}, "native types");
|
||||
|
||||
eyes.inspect({
|
||||
number: new(Number)(42),
|
||||
string: new(String)("John Galt"),
|
||||
regexp: new(RegExp)(/[a-z]+/),
|
||||
array: new(Array)(99, 168, 'x', {}),
|
||||
bool: new(Boolean)(false),
|
||||
object: new(Object)({attr: []}),
|
||||
date: new(Date)
|
||||
}, "wrapped types");
|
||||
|
||||
var obj = {};
|
||||
obj.that = { self: obj };
|
||||
obj.self = obj;
|
||||
|
||||
eyes.inspect(obj, "circular object");
|
||||
eyes.inspect({hello: 'moto'}, "small object");
|
||||
eyes.inspect({hello: new(Array)(6) }, "big object");
|
||||
eyes.inspect(["hello 'world'", 'hello "world"'], "quotes");
|
||||
eyes.inspect({
|
||||
recommendations: [{
|
||||
id: 'a7a6576c2c822c8e2bd81a27e41437d8',
|
||||
key: [ 'spree', 3.764316258020699 ],
|
||||
value: {
|
||||
_id: 'a7a6576c2c822c8e2bd81a27e41437d8',
|
||||
_rev: '1-2e2d2f7fd858c4a5984bcf809d22ed98',
|
||||
type: 'domain',
|
||||
domain: 'spree',
|
||||
weight: 3.764316258020699,
|
||||
product_id: 30
|
||||
}
|
||||
}]
|
||||
}, 'complex');
|
||||
|
||||
eyes.inspect([null], "null in array");
|
||||
|
||||
var inspect = eyes.inspector({ stream: null });
|
||||
|
||||
util.puts(inspect('something', "something"));
|
||||
util.puts(inspect("something else"));
|
||||
|
||||
util.puts(inspect(["no color"], null, { styles: false }));
|
Reference in New Issue
Block a user