Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.19.0'
node-version: "22.5.1"

- name: Install dependencies
run: npm install
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.19.0'
node-version: "22.5.1"

- name: Install dependencies
run: npm install
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.19.0'
node-version: "22.5.1"

- name: Cache node_modules
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.19
22
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"cli": "npx tsx src/index.ts",
"test:system": "npm run mocha 'test/**/*.test.ts'",
"test": "npm run lint && npm run test:system",
"mocha": "mocha --config=test/.mocharc.json --node-env=test --exit"
"mocha": "NODE_OPTIONS='--experimental-require-module' mocha --config=test/.mocharc.json --node-env=test --exit"
},
"author": "Ocean Protocol <[email protected]>",
"license": "Apache-2.0",
Expand Down
3 changes: 1 addition & 2 deletions test/.mocharc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"require": ["ts-node/register"],
"loader": "ts-node/esm",
"full-trace": true,
"bail": true,
"exit": true,
"timeout": "20000"
}
}
9 changes: 4 additions & 5 deletions test/http.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'ts-node/register';
import fetch from 'cross-fetch';
import { expect, assert } from 'chai';

Expand All @@ -16,7 +15,7 @@ describe('Ocean Node Root Endpoint', () => {

// You can also check the values of the properties
expect(responseBody.software).to.equal('Ocean-Node');

// Check if version is "0.0.1" or greater
const [major, minor, patch] = responseBody.version.split('.').map(Number);
expect(major).to.be.at.least(0);
Expand All @@ -41,7 +40,7 @@ describe('Direct Command Endpoint', () => {
body: JSON.stringify({ command: 'status' })
});
const responseBody = await response.json();

expect(response.status).to.equal(200);
expect(responseBody).to.have.property('id');
expect(responseBody).to.have.property('publicKey');
Expand All @@ -56,7 +55,7 @@ describe('Direct Command Endpoint', () => {
expect(responseBody).to.have.property('platform');
expect(responseBody).to.have.property('codeHash');
expect(responseBody).to.have.property('allowedAdmins');

// Check the values of some of the properties
expect(responseBody.http).to.be.true;
expect(responseBody.p2p).to.be.true;
Expand Down Expand Up @@ -85,7 +84,7 @@ describe('Direct Command Endpoint', () => {
}
});
const responseBody = await response.text();

expect(response.status).to.equal(400);
assert(responseBody === "Missing signature")
});
Expand Down
Loading