"react-dom": "16.13.0",
"react-helmet": "5.2.1",
"react-typography": "0.16.19",
- "sonar-ui-common": "1.0.0",
+ "sonar-ui-common": "1.0.2",
"typography": "0.16.19"
},
"devDependencies": {
"singleQuote": true
},
"jest": {
- "globals": {
- "ts-jest": {
- "diagnostics": {
- "ignoreCodes": [
- 151001
- ]
- }
- }
- },
"moduleFileExtensions": [
"ts",
"tsx",
faye-websocket "^0.10.0"
uuid "^3.0.1"
-sonar-ui-common@1.0.0:
- version "1.0.0"
- resolved "https://repox.jfrog.io/repox/api/npm/npm/sonar-ui-common/-/sonar-ui-common-1.0.0.tgz#060bce001925fcce1b86696058819941d3883c63"
- integrity sha1-BgvOABkl/M4bhmlgWIGZQdOIPGM=
+sonar-ui-common@1.0.2:
+ version "1.0.2"
+ resolved "https://repox.jfrog.io/repox/api/npm/npm/sonar-ui-common/-/sonar-ui-common-1.0.2.tgz#a2ae3310e70898696b236e2e53c6a8e3f7e235af"
+ integrity sha1-oq4zEOcImGlrI24uU8ao4/fiNa8=
dependencies:
"@types/react-select" "1.2.6"
classnames "2.2.6"
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import ThemeContext from 'sonar-ui-common/components/theme';
import SonarUiCommonInitializer, { DEFAULT_LOCALE } from 'sonar-ui-common/helpers/init';
+import * as theme from '../../src/main/js/app/theme';
const content = document.createElement('div');
content.id = 'content';
SonarUiCommonInitializer.setLocale(DEFAULT_LOCALE)
.setMessages({})
.setUrlContext(baseUrl);
+
+// Hack : override the default value of the context used for theme by emotion
+// This allows tests to get the theme value without specifiying a theme provider
+ThemeContext['_currentValue'] = theme;
+ThemeContext['_currentValue2'] = theme;
coverageReporters: ['lcovonly', 'text'],
globals: {
'ts-jest': {
- diagnostics: {
- ignoreCodes: [151001]
- }
+ diagnostics: false
}
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
"rehype-slug": "3.0.0",
"remark-custom-blocks": "2.5.0",
"remark-rehype": "6.0.0",
- "sonar-ui-common": "1.0.0",
+ "sonar-ui-common": "1.0.2",
"unist-util-visit": "2.0.2",
"valid-url": "1.0.9",
"whatwg-fetch": "3.0.0"
faye-websocket "^0.10.0"
uuid "^3.0.1"
-sonar-ui-common@1.0.0:
- version "1.0.0"
- resolved "https://repox.jfrog.io/repox/api/npm/npm/sonar-ui-common/-/sonar-ui-common-1.0.0.tgz#060bce001925fcce1b86696058819941d3883c63"
- integrity sha1-BgvOABkl/M4bhmlgWIGZQdOIPGM=
+sonar-ui-common@1.0.2:
+ version "1.0.2"
+ resolved "https://repox.jfrog.io/repox/api/npm/npm/sonar-ui-common/-/sonar-ui-common-1.0.2.tgz#a2ae3310e70898696b236e2e53c6a8e3f7e235af"
+ integrity sha1-oq4zEOcImGlrI24uU8ao4/fiNa8=
dependencies:
"@types/react-select" "1.2.6"
classnames "2.2.6"