Skip to content

Commit

Permalink
fix-mock
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoLC committed Dec 11, 2024
1 parent 9bf4115 commit afa0af9
Show file tree
Hide file tree
Showing 5 changed files with 368 additions and 384 deletions.
1 change: 1 addition & 0 deletions src/frontend/servers/y-provider/__mocks__/mock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
4 changes: 2 additions & 2 deletions src/frontend/servers/y-provider/__tests__/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ describe('Server Tests', () => {
content: '',
});

expect(response.status).toBe(500);
expect(response.body.error).toBe('No valid blocks were generated');
expect(response.status).toBe(400);
expect(response.body.error).toBe('Invalid request: missing content');
});

['/collaboration/api/anything/', '/', '/anything'].forEach((path) => {
Expand Down
1 change: 1 addition & 0 deletions src/frontend/servers/y-provider/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var config = {
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/../src/$1',
'^@blocknote/server-util$': '<rootDir>/../__mocks__/mock.js',
},
};
export default config;
2 changes: 1 addition & 1 deletion src/frontend/servers/y-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"node": ">=18"
},
"dependencies": {
"@blocknote/server-util": "0.17.1",
"@blocknote/server-util": "0.20.0",
"@hocuspocus/server": "2.14.0",
"@sentry/node": "8.41.0",
"@sentry/profiling-node": "8.41.0",
Expand Down
Loading

0 comments on commit afa0af9

Please sign in to comment.