| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,10 +2,10 @@ | |||
| 2 | 2 | // Simple tests of most basic domain functionality. | |
| 3 | 3 | ||
| 4 | 4 | require('../common'); | |
| 5 | - var assert = require('assert'); | ||
| 6 | - var domain = require('domain'); | ||
| 7 | - var events = require('events'); | ||
| 8 | - var fs = require('fs'); | ||
| 5 | + const assert = require('assert'); | ||
| 6 | + const domain = require('domain'); | ||
| 7 | + const events = require('events'); | ||
| 8 | + const fs = require('fs'); | ||
| 9 | 9 | var caught = 0; | |
| 10 | 10 | var expectCaught = 0; | |
| 11 | 11 | ||
@@ -137,8 +137,8 @@ d.run(function() { | |||
| 137 | 137 | // pretty common error. | |
| 138 | 138 | console.log(stat.isDirectory()); | |
| 139 | 139 | }); | |
| 140 | - }); | ||
| 141 | - }); | ||
| 140 | + }, 1); | ||
| 141 | + }, 1); | ||
| 142 | 142 | }); | |
| 143 | 143 | }); | |
| 144 | 144 | expectCaught++; | |
@@ -148,7 +148,7 @@ expectCaught++; | |||
| 148 | 148 | d.run(function() { | |
| 149 | 149 | setTimeout(function() { | |
| 150 | 150 | throw new Error('implicit timer'); | |
| 151 | - }); | ||
| 151 | + }, 1); | ||
| 152 | 152 | }); | |
| 153 | 153 | expectCaught++; | |
| 154 | 154 | ||
@@ -162,7 +162,7 @@ expectCaught++; | |||
| 162 | 162 | // get rid of the `if (er) return cb(er)` malarky, by intercepting | |
| 163 | 163 | // the cb functions to the domain, and using the intercepted function | |
| 164 | 164 | // as a callback instead. | |
| 165 | - function fn(er) { | ||
| 165 | + function fn() { | ||
| 166 | 166 | throw new Error('This function should never be called!'); | |
| 167 | 167 | } | |
| 168 | 168 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments