Skip to content

Commit 2159316

Browse files
matz3flovogt
authored andcommitted
Example: Use custom sinon version via shim
1 parent 19b95d2 commit 2159316

File tree

4 files changed

+151
-4
lines changed

4 files changed

+151
-4
lines changed

package-lock.json

Lines changed: 131 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"karma-coverage": "^2.2.1",
2828
"karma-ui5": "^3.0.3",
2929
"local-web-server": "^5.3.0",
30-
"rimraf": "^5.0.1"
30+
"rimraf": "^5.0.1",
31+
"sinon": "^15.2.0"
3132
}
3233
}

ui5.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,20 @@ server:
1414
customMiddleware:
1515
- name: "@ui5/middleware-code-coverage"
1616
afterMiddleware: compression
17+
---
18+
specVersion: '2.0'
19+
metadata:
20+
name: sinon-shim
21+
kind: extension
22+
type: project-shim
23+
shims:
24+
configurations:
25+
sinon:
26+
specVersion: '2.0'
27+
metadata:
28+
name: sinon
29+
type: module
30+
resources:
31+
configuration:
32+
paths:
33+
"/resources/node_modules/sinon/": "."

webapp/test/unit/unitTests.qunit.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
<script src="../../resources/sap/ui/thirdparty/qunit-2.js"></script>
2020
<script src="../../resources/sap/ui/qunit/qunit-junit.js"></script>
2121
<script src="../../resources/sap/ui/qunit/qunit-coverage-istanbul.js" data-sap-ui-cover-only="sap/ui/demo/todo/" data-sap-ui-cover-never="sap/ui/demo/todo/test/"></script>
22-
<script src="../../resources/sap/ui/thirdparty/sinon.js"></script>
23-
<script src="../../resources/sap/ui/thirdparty/sinon-qunit.js"></script>
22+
<script src="../../resources/node_modules/sinon/pkg/sinon.js"></script>
2423

2524
<script src="unitTests.qunit.js"></script>
2625
</head>

0 commit comments

Comments
 (0)