sforkowany z mirror/soapbox
Update tests for Jest v28, apply uuid hack
https://github.com/uuidjs/uuid/pull/616#issuecomment-1111012599feed-suggestions
rodzic
0dc9478600
commit
8bcf5fe82d
|
@ -2,6 +2,7 @@ import {
|
|||
Map as ImmutableMap,
|
||||
OrderedSet as ImmutableOrderedSet,
|
||||
fromJS,
|
||||
is,
|
||||
} from 'immutable';
|
||||
|
||||
import { STATUS_IMPORT } from 'soapbox/actions/importer';
|
||||
|
@ -111,7 +112,7 @@ describe('contexts reducer', () => {
|
|||
}) as ImmutableMap<string, ImmutableOrderedSet<string>>,
|
||||
});
|
||||
|
||||
expect(reducer(state, action)).toEqual(expected);
|
||||
expect(is(reducer(state, action), expected)).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -33,6 +33,10 @@ module.exports = {
|
|||
'<rootDir>/node_modules',
|
||||
'<rootDir>/app',
|
||||
],
|
||||
'moduleNameMapper': {
|
||||
// https://github.com/uuidjs/uuid/pull/616#issuecomment-1111012599
|
||||
'^uuid$': require.resolve('uuid'),
|
||||
},
|
||||
'testMatch': ['**/*/__tests__/**/?(*.|*-)+(test).(ts|js)?(x)'],
|
||||
'testEnvironment': 'jsdom',
|
||||
'transformIgnorePatterns': [
|
||||
|
|
Ładowanie…
Reference in New Issue