Skip to content

Commit

Permalink
Example: Use custom sinon version via shim
Browse files Browse the repository at this point in the history
  • Loading branch information
matz3 authored and flovogt committed Aug 17, 2023
1 parent 19b95d2 commit 2159316
Show file tree
Hide file tree
Showing 4 changed files with 151 additions and 4 deletions.
132 changes: 131 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"karma-coverage": "^2.2.1",
"karma-ui5": "^3.0.3",
"local-web-server": "^5.3.0",
"rimraf": "^5.0.1"
"rimraf": "^5.0.1",
"sinon": "^15.2.0"
}
}
17 changes: 17 additions & 0 deletions ui5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,20 @@ server:
customMiddleware:
- name: "@ui5/middleware-code-coverage"
afterMiddleware: compression
---
specVersion: '2.0'
metadata:
name: sinon-shim
kind: extension
type: project-shim
shims:
configurations:
sinon:
specVersion: '2.0'
metadata:
name: sinon
type: module
resources:
configuration:
paths:
"/resources/node_modules/sinon/": "."
3 changes: 1 addition & 2 deletions webapp/test/unit/unitTests.qunit.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
<script src="../../resources/sap/ui/thirdparty/qunit-2.js"></script>
<script src="../../resources/sap/ui/qunit/qunit-junit.js"></script>
<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>
<script src="../../resources/sap/ui/thirdparty/sinon.js"></script>
<script src="../../resources/sap/ui/thirdparty/sinon-qunit.js"></script>
<script src="../../resources/node_modules/sinon/pkg/sinon.js"></script>

<script src="unitTests.qunit.js"></script>
</head>
Expand Down

0 comments on commit 2159316

Please sign in to comment.