Removed dependency on jest-extended

This commit is contained in:
Nir Gazit
2021-01-19 20:56:01 +02:00
parent 2ffe0c9816
commit d2b534e87c
4 changed files with 25 additions and 61 deletions
-1
View File
@@ -45,7 +45,6 @@
"@backstage/cli": "^0.4.3",
"@types/jest-when": "^2.7.2",
"@types/lodash": "^4.14.151",
"jest-extended": "^0.11.5",
"jest-when": "^3.1.0",
"supertest": "^4.0.2"
},
@@ -72,26 +72,29 @@ describe('router', () => {
expect(response.status).toEqual(200);
expect(response.body.consumerId).toEqual('hey');
expect(response.body.offsets).toIncludeSameMembers([
{
topic: 'topic1',
partitionId: 1,
groupOffset: '100',
topicOffset: '500',
},
{
topic: 'topic1',
partitionId: 2,
groupOffset: '213',
topicOffset: '1000',
},
{
topic: 'topic2',
partitionId: 1,
groupOffset: '456',
topicOffset: '456',
},
]);
// Note the Set comparison here since there's no guarantee on the order of the elements in the list.
expect(new Set(response.body.offsets)).toStrictEqual(
new Set([
{
topic: 'topic1',
partitionId: 1,
groupOffset: '100',
topicOffset: '500',
},
{
topic: 'topic1',
partitionId: 2,
groupOffset: '213',
topicOffset: '1000',
},
{
topic: 'topic2',
partitionId: 1,
groupOffset: '456',
topicOffset: '456',
},
]),
);
});
it('handles internal error correctly', async () => {
+1 -8
View File
@@ -14,11 +14,4 @@
* limitations under the License.
*/
import type { Config } from '@jest/types';
import 'jest-extended';
const config: Config.InitialOptions = {
setupFilesAfterEnv: ['jest-extended'],
};
export default config;
export {};