"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/process-nextick-args/test.js" (7 Feb 2017, 526 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 test = require("tap").test;
    2 var nextTick = require('./');
    3 
    4 test('should work', function (t) {
    5   t.plan(5);
    6   nextTick(function (a) {
    7     t.ok(a);
    8     nextTick(function (thing) {
    9       t.equals(thing, 7);
   10     }, 7);
   11   }, true);
   12   nextTick(function (a, b, c) {
   13     t.equals(a, 'step');
   14     t.equals(b, 3);
   15     t.equals(c, 'profit');
   16   }, 'step', 3,  'profit');
   17 });
   18 
   19 test('correct number of arguments', function (t) {
   20   t.plan(1);
   21   nextTick(function () {
   22     t.equals(2, arguments.length, 'correct number');
   23   }, 1, 2);
   24 });