"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/util-extend/test.js" (8 Mar 2017, 453 Bytes) of archive /windows/misc/atom-windows.zip:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 var assert = require('assert');
    2 var extend = require('./');
    3 assert.deepEqual(extend({a:1}),             {a:1});
    4 assert.deepEqual(extend({a:1}, []),         {a:1});
    5 assert.deepEqual(extend({a:1}, null),       {a:1});
    6 assert.deepEqual(extend({a:1}, true),       {a:1});
    7 assert.deepEqual(extend({a:1}, false),      {a:1});
    8 assert.deepEqual(extend({a:1}, {b:2}),      {a:1, b:2});
    9 assert.deepEqual(extend({a:1, b:2}, {b:3}), {a:1, b:3});
   10 console.log('ok');