aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/config
diff options
context:
space:
mode:
authorPhilippe Perrin <philippe.perrin@sonarsource.com>2020-05-15 09:15:38 +0200
committersonartech <sonartech@sonarsource.com>2020-05-27 20:05:46 +0000
commitfd91b02d132511a2436722d77161f746d01910cd (patch)
tree0a323109f558f3e41d3f05d3445ed0553c133f1e /server/sonar-web/config
parent5e9d00966008decae9ae040fa6701ee7e9da0545 (diff)
downloadsonarqube-fd91b02d132511a2436722d77161f746d01910cd.tar.gz
sonarqube-fd91b02d132511a2436722d77161f746d01910cd.zip
Bump to sonar-ui-common@1.0.0
Diffstat (limited to 'server/sonar-web/config')
-rw-r--r--server/sonar-web/config/jest/SetupTestEnvironment.ts (renamed from server/sonar-web/config/jest/SetupTestEnvironment.js)13
1 files changed, 8 insertions, 5 deletions
diff --git a/server/sonar-web/config/jest/SetupTestEnvironment.js b/server/sonar-web/config/jest/SetupTestEnvironment.ts
index bfd615891b6..e60b3048b4c 100644
--- a/server/sonar-web/config/jest/SetupTestEnvironment.js
+++ b/server/sonar-web/config/jest/SetupTestEnvironment.ts
@@ -17,12 +17,15 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-window.baseUrl = '';
-window.t = window.tp = function() {
- const args = Array.prototype.slice.call(arguments, 0);
- return args.join('.');
-};
+
+import SonarUiCommonInitializer, { DEFAULT_LOCALE } from 'sonar-ui-common/helpers/init';
const content = document.createElement('div');
content.id = 'content';
document.documentElement.appendChild(content);
+
+const baseUrl = '';
+(window as any).baseUrl = baseUrl;
+SonarUiCommonInitializer.setLocale(DEFAULT_LOCALE)
+ .setMessages({})
+ .setUrlContext(baseUrl);