Skip to content
Open
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
11 changes: 3 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
# node-version: [10.x, 12.x, 14.x, 15.x]
node-version: [10.x, 12.x, 14.x, 16.x]
node-version: [16.x, 18.x]
fail-fast: false

steps:
Expand All @@ -34,21 +34,16 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-

- name: Install dependencies
run: npm run setup-no-old-node
if: ${{ matrix.node-version == '10.x' || matrix.node-version == '12.x' }}

- name: Install dependencies
run: npm run setup
if: ${{ matrix.node-version != '10.x' && matrix.node-version != '12.x' }}

- name: Execute unit tests
run: npm run test:unit

- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.9.0
uses: supercharge/mongodb-github-action@1.10.0
with:
mongodb-version: 4.4
mongodb-version: 6.0.15

- name: Execute integration tests
run: npm run test:integration
3 changes: 3 additions & 0 deletions packages/moleculer-db-adapter-mongo/examples/search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,7 @@ broker.start()
search: "Dianne"
}).then(res => console.log(res));
})
.then(() => {
return broker.stop();
})
.catch(err => broker.logger.error(err));
4 changes: 2 additions & 2 deletions packages/moleculer-db-adapter-mongo/examples/simple/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ broker.createService(StoreService, {
}
});

const checker = new ModuleChecker(24);
const checker = new ModuleChecker(23);

// Start checks
function start() {
Expand All @@ -55,7 +55,7 @@ checker.add("COUNT", () => adapter.count(), res => {
checker.add("INSERT", () => adapter.insert({ title: "Hello", content: "Post content", votes: 3, status: true, createdAt: date }), doc => {
ids[0] = doc._id.toHexString();
console.log("Saved: ", doc);
return doc._id && doc.title === "Hello" && doc.content === "Post content" && doc.votes === 3 && doc.status === true && doc.createdAt === date;
return doc._id && doc.title === "Hello" && doc.content === "Post content" && doc.votes === 3 && doc.status === true && doc.createdAt.toISOString() === date.toISOString();
});

// Find
Expand Down
Loading