aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-docs/config
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2019-01-15 10:48:40 +0100
committerSonarTech <sonartech@sonarsource.com>2019-01-22 20:21:02 +0100
commitb1e8eaffc8569fcd1005a4a6f5d2768649c06c0c (patch)
treeaee29ea54c3305514f13169aaa71411a5bbc1956 /server/sonar-docs/config
parent33946649b9aabb705d4d3aaa90b0b23bbb5f032c (diff)
downloadsonarqube-b1e8eaffc8569fcd1005a4a6f5d2768649c06c0c.tar.gz
sonarqube-b1e8eaffc8569fcd1005a4a6f5d2768649c06c0c.zip
Upgrade sonar-docs to gatsby v2 and Typescript
* Upgrade to gatsby v2 * Migrate to TS * Add jest tests of some components * Remove glamor
Diffstat (limited to 'server/sonar-docs/config')
-rw-r--r--server/sonar-docs/config/jest/CSSStub.js6
-rw-r--r--server/sonar-docs/config/jest/FileStub.js6
-rw-r--r--server/sonar-docs/config/jest/SetupEnzyme.js23
3 files changed, 35 insertions, 0 deletions
diff --git a/server/sonar-docs/config/jest/CSSStub.js b/server/sonar-docs/config/jest/CSSStub.js
new file mode 100644
index 00000000000..cd35908524e
--- /dev/null
+++ b/server/sonar-docs/config/jest/CSSStub.js
@@ -0,0 +1,6 @@
+/*
+ * Copyright (C) 2017-2019 SonarSource SA
+ * All rights reserved
+ * mailto:info AT sonarsource DOT com
+ */
+module.exports = {};
diff --git a/server/sonar-docs/config/jest/FileStub.js b/server/sonar-docs/config/jest/FileStub.js
new file mode 100644
index 00000000000..9ad4393626b
--- /dev/null
+++ b/server/sonar-docs/config/jest/FileStub.js
@@ -0,0 +1,6 @@
+/*
+ * Copyright (C) 2017-2019 SonarSource SA
+ * All rights reserved
+ * mailto:info AT sonarsource DOT com
+ */
+module.exports = 'test-file-stub';
diff --git a/server/sonar-docs/config/jest/SetupEnzyme.js b/server/sonar-docs/config/jest/SetupEnzyme.js
new file mode 100644
index 00000000000..2f3e19df52a
--- /dev/null
+++ b/server/sonar-docs/config/jest/SetupEnzyme.js
@@ -0,0 +1,23 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+const Enzyme = require('enzyme');
+const Adapter = require('enzyme-adapter-react-16');
+
+Enzyme.configure({ adapter: new Adapter() });