kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Update tests for Jest v28, apply uuid hack
https://github.com/uuidjs/uuid/pull/616#issuecomment-1111012599environments/review-tabler-v1-wtp275/deployments/516
rodzic
0dc9478600
commit
8bcf5fe82d
|
@ -2,6 +2,7 @@ import {
|
||||||
Map as ImmutableMap,
|
Map as ImmutableMap,
|
||||||
OrderedSet as ImmutableOrderedSet,
|
OrderedSet as ImmutableOrderedSet,
|
||||||
fromJS,
|
fromJS,
|
||||||
|
is,
|
||||||
} from 'immutable';
|
} from 'immutable';
|
||||||
|
|
||||||
import { STATUS_IMPORT } from 'soapbox/actions/importer';
|
import { STATUS_IMPORT } from 'soapbox/actions/importer';
|
||||||
|
@ -111,7 +112,7 @@ describe('contexts reducer', () => {
|
||||||
}) as ImmutableMap<string, ImmutableOrderedSet<string>>,
|
}) 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>/node_modules',
|
||||||
'<rootDir>/app',
|
'<rootDir>/app',
|
||||||
],
|
],
|
||||||
|
'moduleNameMapper': {
|
||||||
|
// https://github.com/uuidjs/uuid/pull/616#issuecomment-1111012599
|
||||||
|
'^uuid$': require.resolve('uuid'),
|
||||||
|
},
|
||||||
'testMatch': ['**/*/__tests__/**/?(*.|*-)+(test).(ts|js)?(x)'],
|
'testMatch': ['**/*/__tests__/**/?(*.|*-)+(test).(ts|js)?(x)'],
|
||||||
'testEnvironment': 'jsdom',
|
'testEnvironment': 'jsdom',
|
||||||
'transformIgnorePatterns': [
|
'transformIgnorePatterns': [
|
||||||
|
|
Ładowanie…
Reference in New Issue