This is an automated email from the ASF dual-hosted git repository.

suyanhanx pushed a commit to branch nodejs-layer
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/nodejs-layer by this push:
     new a4df64577 polish tests
a4df64577 is described below

commit a4df6457720b699c49a0ee1c7b09250725d826e5
Author: suyanhanx <[email protected]>
AuthorDate: Mon Nov 13 22:46:53 2023 +0800

    polish tests
    
    Signed-off-by: suyanhanx <[email protected]>
---
 bindings/nodejs/tests/suites/async.suite.mjs | 2 +-
 bindings/nodejs/tests/suites/index.mjs       | 1 -
 bindings/nodejs/tests/suites/sync.suite.mjs  | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/bindings/nodejs/tests/suites/async.suite.mjs 
b/bindings/nodejs/tests/suites/async.suite.mjs
index 8214c1b17..9a68f804e 100644
--- a/bindings/nodejs/tests/suites/async.suite.mjs
+++ b/bindings/nodejs/tests/suites/async.suite.mjs
@@ -28,7 +28,7 @@ export function run(operator) {
     try {
       await operator.stat(filename)
     } catch (error) {
-      assert.ok(error.message.includes('NotFound'))
+      assert.include(error.message, 'NotFound')
     }
   })
 }
diff --git a/bindings/nodejs/tests/suites/index.mjs 
b/bindings/nodejs/tests/suites/index.mjs
index 33969158e..a67467f28 100644
--- a/bindings/nodejs/tests/suites/index.mjs
+++ b/bindings/nodejs/tests/suites/index.mjs
@@ -23,7 +23,6 @@ import { checkRandomRootEnabled, generateRandomRoot, 
loadConfigFromEnv } from '.
 
 import { run as AsyncIOTestRun } from './async.suite.mjs'
 import { run as SyncIOTestRun } from './sync.suite.mjs'
-import { RetryLayer } from '../../generated.js'
 
 export function runner(testName, scheme) {
   if (!scheme) {
diff --git a/bindings/nodejs/tests/suites/sync.suite.mjs 
b/bindings/nodejs/tests/suites/sync.suite.mjs
index 473d121c6..5e73444d3 100644
--- a/bindings/nodejs/tests/suites/sync.suite.mjs
+++ b/bindings/nodejs/tests/suites/sync.suite.mjs
@@ -28,7 +28,7 @@ export function run(operator) {
     try {
       operator.statSync(filename)
     } catch (error) {
-      assert.ok(error.message.includes('NotFound'))
+      assert.include(error.message, 'NotFound')
     }
   })
 }

Reply via email to