| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 78592a3 commit a256482
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,7 +31,7 @@ For example: | |||
| 31 | 31 | const util = require('util'); | |
| 32 | 32 | ||
| 33 | 33 | async function fn() { | |
| 34 | - return await Promise.resolve('hello world'); | ||
| 34 | + return 'hello world'; | ||
| 35 | 35 | } | |
| 36 | 36 | const callbackFunction = util.callbackify(fn); | |
| 37 | 37 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -390,7 +390,7 @@ class NodeInstance { | |||
| 390 | 390 | console.log('[test]', 'Connecting to a child Node process'); | |
| 391 | 391 | const response = await this.httpGet(null, '/json/list'); | |
| 392 | 392 | const url = response[0]['webSocketDebuggerUrl']; | |
| 393 | - return await this.wsHandshake(url); | ||
| 393 | + return this.wsHandshake(url); | ||
| 394 | 394 | } | |
| 395 | 395 | ||
| 396 | 396 | expectShutdown() { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,7 +28,7 @@ const values = [ | |||
| 28 | 28 | for (const value of values) { | |
| 29 | 29 | // Test and `async function` | |
| 30 | 30 | async function asyncFn() { | |
| 31 | - return await Promise.resolve(value); | ||
| 31 | + return value; | ||
| 32 | 32 | } | |
| 33 | 33 | ||
| 34 | 34 | const cbAsyncFn = callbackify(asyncFn); | |
@@ -70,7 +70,7 @@ const values = [ | |||
| 70 | 70 | for (const value of values) { | |
| 71 | 71 | // Test an `async function` | |
| 72 | 72 | async function asyncFn() { | |
| 73 | - return await Promise.reject(value); | ||
| 73 | + return Promise.reject(value); | ||
| 74 | 74 | } | |
| 75 | 75 | ||
| 76 | 76 | const cbAsyncFn = callbackify(asyncFn); | |
@@ -142,7 +142,7 @@ const values = [ | |||
| 142 | 142 | for (const value of values) { | |
| 143 | 143 | async function asyncFn(arg) { | |
| 144 | 144 | assert.strictEqual(arg, value); | |
| 145 | - return await Promise.resolve(arg); | ||
| 145 | + return arg; | ||
| 146 | 146 | } | |
| 147 | 147 | ||
| 148 | 148 | const cbAsyncFn = callbackify(asyncFn); | |
@@ -183,7 +183,7 @@ const values = [ | |||
| 183 | 183 | const iAmThat = { | |
| 184 | 184 | async fn(arg) { | |
| 185 | 185 | assert.strictEqual(this, iAmThat); | |
| 186 | - return await Promise.resolve(arg); | ||
| 186 | + return arg; | ||
| 187 | 187 | }, | |
| 188 | 188 | }; | |
| 189 | 189 | iAmThat.cbFn = callbackify(iAmThat.fn); | |
@@ -241,7 +241,7 @@ const values = [ | |||
| 241 | 241 | ||
| 242 | 242 | { | |
| 243 | 243 | async function asyncFn() { | |
| 244 | - return await Promise.resolve(42); | ||
| 244 | + return 42; | ||
| 245 | 245 | } | |
| 246 | 246 | ||
| 247 | 247 | const cb = callbackify(asyncFn); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments