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

HTHou pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/iotdb-client-nodejs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 0855f1e  Update branch names for E2E tests workflow and fix CI (#12)
0855f1e is described below

commit 0855f1e6718f4dd188fa6e3bd3c3f867fa19a65e
Author: Haonan <[email protected]>
AuthorDate: Fri Jun 26 10:53:27 2026 +0800

    Update branch names for E2E tests workflow and fix CI (#12)
    
    Co-authored-by: CritasWang <[email protected]>
---
 .github/workflows/e2e-1c1d.yml | 4 ++--
 .github/workflows/e2e-1c3d.yml | 4 ++--
 jest.config.js                 | 7 +++++++
 tests/e2e/Redirection.test.ts  | 9 +++++++--
 4 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/e2e-1c1d.yml b/.github/workflows/e2e-1c1d.yml
index 5f01d42..2cb20be 100644
--- a/.github/workflows/e2e-1c1d.yml
+++ b/.github/workflows/e2e-1c1d.yml
@@ -2,9 +2,9 @@ name: E2E Tests (1C1D)
 
 on:
   push:
-    branches: [ main, dev/* ]
+    branches: [ develop, dev/* ]
   pull_request:
-    branches: [ main ]
+    branches: [ develop ]
 
 jobs:
   e2e-1c1d:
diff --git a/.github/workflows/e2e-1c3d.yml b/.github/workflows/e2e-1c3d.yml
index d2bfd81..8c336e7 100644
--- a/.github/workflows/e2e-1c3d.yml
+++ b/.github/workflows/e2e-1c3d.yml
@@ -2,9 +2,9 @@ name: E2E Tests (1C3D)
 
 on:
   push:
-    branches: [ main, dev/* ]
+    branches: [ develop, dev/* ]
   pull_request:
-    branches: [ main ]
+    branches: [ develop ]
 
 jobs:
   e2e-1c3d:
diff --git a/jest.config.js b/jest.config.js
index 7c61c56..5be6d6c 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -4,6 +4,13 @@ module.exports = {
   roots: ['<rootDir>/tests'],
   testMatch: ['**/*.test.ts'],
   moduleFileExtensions: ['ts', 'js', 'json'],
+  // [email protected] pulls in uuid@13, which ships ESM-only (type: "module").
+  // ts-jest must compile it to CommonJS, so allow .js transforms and stop
+  // ignoring the uuid package under node_modules.
+  transform: {
+    '^.+\\.[tj]s$': ['ts-jest', { tsconfig: { allowJs: true } }],
+  },
+  transformIgnorePatterns: ['/node_modules/(?!uuid/)'],
   collectCoverageFrom: [
     'src/**/*.ts',
     '!src/**/*.d.ts',
diff --git a/tests/e2e/Redirection.test.ts b/tests/e2e/Redirection.test.ts
index e9a41a6..5a4dccb 100644
--- a/tests/e2e/Redirection.test.ts
+++ b/tests/e2e/Redirection.test.ts
@@ -156,12 +156,17 @@ describe("Redirection E2E Tests", () => {
         "root.test_redirect.device5",
       ];
 
-      for (const deviceId of devices) {
+      const baseTime = Date.now();
+      for (const [index, deviceId] of devices.entries()) {
         const tablet = {
           deviceId,
           measurements: ["temperature", "humidity"],
           dataTypes: [TSDataType.FLOAT, TSDataType.FLOAT],
-          timestamps: [Date.now()],
+          // Offset each device's timestamp so the fast write loop cannot
+          // assign the same millisecond to two devices. Tree-model queries
+          // align rows by timestamp, so colliding timestamps would merge
+          // rows and make the row count fall short of the device count.
+          timestamps: [baseTime + index],
           values: [[25.5 + Math.random() * 5, 60.0 + Math.random() * 10]],
         };
 

Reply via email to