Election-Tech-Initiative / Election-Tech-Initiative/electionguard-tracking-site

Tests are broken

Open
#38 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
8
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Running `yarn test` or `npm run test` results in the following error due to issues between FluentUI and Jest:
```
/var/code/microsoft/electionguard-tracking-site/node_modules/office-ui-fabric-react/lib/Icon.js:1
({"Object.":function(module,exports,require,__dirname,__filename,global,jest){export * from './components/Icon/index';
^^^^^^

SyntaxError: Unexpected token 'export'

1 | import React from 'react';
> 2 | import { FontIcon } from 'office-ui-fabric-react/lib/Icon';
| ^
3 | import { mergeStyles } from 'office-ui-fabric-react/lib/Styling';
4 | import { IPalette, Stack, Text } from '@fluentui/react';
5 | import { useTheme } from '@fluentui/react-theme-provider';

at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:579:25)
at Object. (src/components/StatusMessage.tsx:2:1)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.