Skip to content

Commit 1489e60

Browse files
committed
fix: fix the check for compat tests
1 parent 0009d11 commit 1489e60

25 files changed

+29
-29
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,15 @@ jobs:
179179
pnpm run test.unit
180180
continue-on-error: true
181181

182-
- name: Test Compatibility
182+
- name: Test Compatibility
183183
if: ${{ !matrix.docker }}
184184
uses: nick-fields/retry@v3
185185
with:
186186
timeout_minutes: 5
187187
max_attempts: 1
188188
command: |
189189
pnpm run clean.temp
190-
pnpm run test.compat
190+
pnpm run test.unit.compat
191191
continue-on-error: true
192192

193193
- name: Test Electron (Main)

.mocharc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*/
44
const config = {
55
require: ["ts-node/register"],
6-
spec: ["test/unit/**/*-test.ts"],
76
"expose-gc": true,
87
"v8-expose-gc": true,
98
exit: true,

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"mochaExplorer.env": {
1919
"INCLUDE_COMPAT_TESTS": "true"
2020
},
21+
"mochaExplorer.files": "test/unit/**/*-test.ts",
2122
"files.exclude": {
2223
"**/.DS_Store": true,
2324
"**/Thumbs.db": true,

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@
9898
"build.native.debug": "cmake-ts dev-os-only",
9999
"build": "run-p build.js build.native",
100100
"build.debug": "run-s build.js build.native.debug",
101-
"test": "run-s clean.temp test.unit.compat clean.temp test.unit",
102-
"test.unit": "cross-env INCLUDE_COMPAT_TESTS=false mocha ./test/unit/*-test.ts",
103-
"test.unit.compat": "cross-env INCLUDE_COMPAT_TESTS=true mocha ./test/unit/compat/*-test.ts",
101+
"test": "run-s test.unit",
102+
"test.unit": "run-s clean.temp build && cross-env INCLUDE_COMPAT_TESTS=false mocha ./test/unit/*-test.ts",
103+
"test.unit.compat": "run-s clean.temp build && cross-env INCLUDE_COMPAT_TESTS=true mocha ./test/unit/compat/*-test.ts",
104104
"test.smoke": "bash ./script/smoke-test.bash",
105-
"test.skip_gc_tests": "run-s clean.temp build.debug && cross-env SKIP_GC_TESTS=true mocha",
105+
"test.skip_gc_tests": "run-s clean.temp build && cross-env SKIP_GC_TESTS=true mocha",
106106
"test.electron.main": "run-s clean.temp build && electron-mocha",
107107
"format": "run-s format.prettier format.clang-format",
108108
"format.prettier": "prettier -l --cache --cache-location ./.cache/prettier --write .",

test/unit/compat/context-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as zmq from "../../../v5-compat"
22
import {assert} from "chai"
33

4-
if (process.env.INCLUDE_COMPAT_TESTS) {
4+
if (process.env.INCLUDE_COMPAT_TESTS === "true") {
55
describe("compat context", function () {
66
it("should support setting max io threads", function () {
77
zmq.Context.setMaxThreads(3)

test/unit/compat/exports-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {capability} from "../../../src"
33
import {assert} from "chai"
44
import semver from "semver"
55

6-
if (process.env.INCLUDE_COMPAT_TESTS) {
6+
if (process.env.INCLUDE_COMPAT_TESTS === "true") {
77
describe("compat exports", function () {
88
it("should export a valid version", function () {
99
assert.ok(semver.valid(zmq.version))

test/unit/compat/gc-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as zmq from "../../../v5-compat"
22
import {assert} from "chai"
33
import {testProtos, uniqAddress} from "../helpers"
44

5-
if (process.env.INCLUDE_COMPAT_TESTS) {
5+
if (process.env.INCLUDE_COMPAT_TESTS === "true") {
66
for (const proto of testProtos("tcp", "inproc")) {
77
describe(`compat socket with ${proto}`, function () {
88
let address: string

test/unit/compat/socket-error-callback-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type {Socket} from "../../../v5-compat"
33
import {isFullError} from "../../../src/errors"
44
import {assert} from "chai"
55

6-
if (process.env.INCLUDE_COMPAT_TESTS) {
6+
if (process.env.INCLUDE_COMPAT_TESTS === "true") {
77
describe("compat socket error callback", function () {
88
let sock: Socket
99

test/unit/compat/socket-events-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as zmq from "../../../v5-compat"
22
import {assert} from "chai"
33
import {testProtos, uniqAddress} from "../helpers"
44

5-
if (process.env.INCLUDE_COMPAT_TESTS) {
5+
if (process.env.INCLUDE_COMPAT_TESTS === "true") {
66
for (const proto of testProtos("tcp", "inproc")) {
77
describe(`compat socket with ${proto} events`, function () {
88
let address: string

test/unit/compat/socket-messages-test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import * as zmq from "../../../v5-compat"
22
import {assert} from "chai"
33
import {testProtos, uniqAddress} from "../helpers"
44

5-
if (process.env.INCLUDE_COMPAT_TESTS) {
6-
for (const proto of testProtos("tcp", "inproc")) {
5+
if (process.env.INCLUDE_COMPAT_TESTS === "true") {
6+
for (const proto of testProtos( "inproc")) {
77
describe(`compat socket with ${proto} messages`, function () {
88
let push: zmq.Socket
99
let pull: zmq.Socket

0 commit comments

Comments
 (0)