Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the test and improve E2eSsrEnv for jest as needed #263

Open
birdofpreyru opened this issue Oct 5, 2022 · 0 comments
Open

Fix the test and improve E2eSsrEnv for jest as needed #263

birdofpreyru opened this issue Oct 5, 2022 · 0 comments
Labels
On Hold Blocked by another ticket / issue / etc. P2 Important. Nice to have improvements and optimizations.

Comments

@birdofpreyru
Copy link
Owner

birdofpreyru commented Oct 5, 2022

For now it is blocked by #264, and might be automatically resolved once that issue is fixed.


See the TODO comment in the code:

/** @jest-environment jsdom */
import mockdate from 'mockdate';
import { mockClientSide } from 'utils/jest';
mockdate.set('2020-04-19Z');
// TODO: This was disabled after upgrade of axios to 1.0.0, as it uses not
// compiled ES imports, and thus requires client side to use webpack build
// environment. However, current implementation of E2eSsrEnv has misc issues
// to make it work: SASS fails if we can't set correct context needed to resolve
// SCSS imports.
test.skip('Export at client side', () => {
mockClientSide();
const lib = require('../src');
expect(lib).toMatchSnapshot();
expect({ ...lib._ }).toMatchSnapshot();
expect({ ...lib.api }).toMatchSnapshot();
expect(Object.keys(lib.time)).toMatchSnapshot();
});

@birdofpreyru birdofpreyru added the P2 Important. Nice to have improvements and optimizations. label Oct 5, 2022
@birdofpreyru birdofpreyru added the On Hold Blocked by another ticket / issue / etc. label Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
On Hold Blocked by another ticket / issue / etc. P2 Important. Nice to have improvements and optimizations.
Projects
None yet
Development

No branches or pull requests

1 participant