Skip to content

Commit

Permalink
fixup! feat: Support updates with readonly array values
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanbeevers committed May 29, 2024
1 parent 4e67b0a commit 3bb1d86
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/__tests__/model.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,35 @@ describe('model', () => {
});
});

test('simple schema with inline operations', async () => {
await simpleModel.bulkWrite([
{
insertOne: {
document: {
bar: 123,
foo: 'foo',
},
},
},
]);

expect(collection.bulkWrite).toHaveBeenCalledWith(
[
{
insertOne: {
document: {
bar: 123,
foo: 'foo',
},
},
},
],
{
ignoreUndefined: true,
}
);
});

test('simple schema with readonly operations', async () => {
const operations = [
{
Expand Down

0 comments on commit 3bb1d86

Please sign in to comment.