diff --git a/samples/react-ioc-tests/.editorconfig b/samples/react-ioc-tests/.editorconfig
new file mode 100644
index 000000000..8ffcdc4ec
--- /dev/null
+++ b/samples/react-ioc-tests/.editorconfig
@@ -0,0 +1,25 @@
+# EditorConfig helps developers define and maintain consistent
+# coding styles between different editors and IDEs
+# editorconfig.org
+
+root = true
+
+
+[*]
+
+# change these settings to your own preference
+indent_style = space
+indent_size = 2
+
+# we recommend you to keep these unchanged
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
+
+[{package,bower}.json]
+indent_style = space
+indent_size = 2
\ No newline at end of file
diff --git a/samples/react-ioc-tests/.yo-rc.json b/samples/react-ioc-tests/.yo-rc.json
new file mode 100644
index 000000000..052e33e83
--- /dev/null
+++ b/samples/react-ioc-tests/.yo-rc.json
@@ -0,0 +1,11 @@
+{
+ "@microsoft/generator-sharepoint": {
+ "isCreatingSolution": true,
+ "environment": "spo",
+ "version": "1.8.0",
+ "libraryName": "ioc-tests",
+ "libraryId": "d831edc5-e461-4c60-8ebe-178f5270e58e",
+ "packageManager": "npm",
+ "componentType": "webpart"
+ }
+}
\ No newline at end of file
diff --git a/samples/react-ioc-tests/README.md b/samples/react-ioc-tests/README.md
new file mode 100644
index 000000000..aa8341b5e
--- /dev/null
+++ b/samples/react-ioc-tests/README.md
@@ -0,0 +1,70 @@
+# React Inversion Of Control Web Part with Unit Tests using Jest and Enzyme
+
+## Summary
+This web part is provided as an example of implementing an IoC (Inversion of Control) pattern in the context of a SharePoint Framework web part.
+
+Following this pattern greatly improves the modularity, maintainability, and testability of the code.
+
+The example includes 100% test coverage, using Jest and Enzyme, of .ts and .tsx files, excluding *WebPart.ts files. A dependency injector class specific to a web part class is used to map web part properties to component properties and create dependencies. This pattern is designed to remove logic from the *WebPart.ts file, the only ts file that isn't unit tested, and hence ensure that all relevant web part logic is tested.
+
+Included in the coverage is a cache and logger class, along with a service class that fetches data asychronously using @PnP/sp and dynamic bundling.
+
+The example also includes a pipeline definition .yaml file for Azure DevOps CI build pipeline (/pipelines/) which includes the build, running tests, and posting the test coverage results.
+
+![Sample SPFx Web Part implementing IoC pattern](./assets/preview.jpg)
+
+## Used SharePoint Framework Version
+![drop](https://img.shields.io/badge/version-1.8.0-green.svg)
+
+## Applies to
+
+* [SharePoint Framework](https:/dev.office.com/sharepoint)
+* [Office 365 tenant](https://dev.office.com/sharepoint/docs/spfx/set-up-your-development-environment)
+
+
+## Solution
+
+Solution|Author(s)
+--------|---------
+react-ioc-tests | Paul Ryan
+
+## Version history
+
+Version|Date|Comments
+-------|----|--------
+1.0|March 20, 2019|Initial release
+
+## Disclaimer
+**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
+
+---
+
+## Minimal Path to Awesome
+
+- Clone this repository
+- in the command line run:
+ - `npm install`
+ - *`npm test`*
+ - `gulp serve`
+
+## Features
+This web part is provided as an example of implementing an IoC (Inversion of Control) pattern in the context of a SharePoint Framework web part.
+This Web Part illustrates the following concepts on top of the SharePoint Framework:
+
+- Inversion of Control pattern
+- Unit testing with Jest and Enzyme
+- Azure DevOps CI Build Pipeline yaml definition file, includes running tests and checking code coverage
+
+## References
+
+https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-jest-testing
+
+https://blog.velingeorgiev.com/unit-test-your-sharepoint-framework-solution-with-jest
+
+https://www.eliostruyf.com/sharepoint-framework-unit-tests-with-jest/
+
+https://github.com/estruyf/spfx-testing-jest
+
+
+
+
\ No newline at end of file
diff --git a/samples/react-ioc-tests/assets/preview.jpg b/samples/react-ioc-tests/assets/preview.jpg
new file mode 100644
index 000000000..bb9674e64
Binary files /dev/null and b/samples/react-ioc-tests/assets/preview.jpg differ
diff --git a/samples/react-ioc-tests/config/config.json b/samples/react-ioc-tests/config/config.json
new file mode 100644
index 000000000..b410e7c10
--- /dev/null
+++ b/samples/react-ioc-tests/config/config.json
@@ -0,0 +1,18 @@
+{
+ "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json",
+ "version": "2.0",
+ "bundles": {
+ "ioc-tests-web-part": {
+ "components": [
+ {
+ "entrypoint": "./lib/webparts/iocTests/IocTestsWebPart.js",
+ "manifest": "./src/webparts/iocTests/IocTestsWebPart.manifest.json"
+ }
+ ]
+ }
+ },
+ "externals": {},
+ "localizedResources": {
+ "IocTestsWebPartStrings": "lib/webparts/iocTests/loc/{locale}.js"
+ }
+}
diff --git a/samples/react-ioc-tests/config/copy-assets.json b/samples/react-ioc-tests/config/copy-assets.json
new file mode 100644
index 000000000..3771fd04a
--- /dev/null
+++ b/samples/react-ioc-tests/config/copy-assets.json
@@ -0,0 +1,4 @@
+{
+ "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/copy-assets.schema.json",
+ "deployCdnPath": "temp/deploy"
+}
diff --git a/samples/react-ioc-tests/config/deploy-azure-storage.json b/samples/react-ioc-tests/config/deploy-azure-storage.json
new file mode 100644
index 000000000..ceb361c6a
--- /dev/null
+++ b/samples/react-ioc-tests/config/deploy-azure-storage.json
@@ -0,0 +1,7 @@
+{
+ "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json",
+ "workingDir": "./temp/deploy/",
+ "account": "",
+ "container": "ioc-tests",
+ "accessKey": ""
+}
\ No newline at end of file
diff --git a/samples/react-ioc-tests/config/package-solution.json b/samples/react-ioc-tests/config/package-solution.json
new file mode 100644
index 000000000..e54cacb04
--- /dev/null
+++ b/samples/react-ioc-tests/config/package-solution.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
+ "solution": {
+ "name": "ioc-tests-client-side-solution",
+ "id": "d831edc5-e461-4c60-8ebe-178f5270e58e",
+ "version": "1.0.0.0",
+ "includeClientSideAssets": true
+ },
+ "paths": {
+ "zippedPackage": "solution/ioc-tests.sppkg"
+ }
+}
diff --git a/samples/react-ioc-tests/config/serve.json b/samples/react-ioc-tests/config/serve.json
new file mode 100644
index 000000000..090cfe9e6
--- /dev/null
+++ b/samples/react-ioc-tests/config/serve.json
@@ -0,0 +1,10 @@
+{
+ "$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json",
+ "port": 4321,
+ "https": true,
+ "initialPage": "https://localhost:5432/workbench",
+ "api": {
+ "port": 5432,
+ "entryPath": "node_modules/@microsoft/sp-webpart-workbench/lib/api/"
+ }
+}
diff --git a/samples/react-ioc-tests/config/write-manifests.json b/samples/react-ioc-tests/config/write-manifests.json
new file mode 100644
index 000000000..bad352605
--- /dev/null
+++ b/samples/react-ioc-tests/config/write-manifests.json
@@ -0,0 +1,4 @@
+{
+ "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json",
+ "cdnBasePath": ""
+}
\ No newline at end of file
diff --git a/samples/react-ioc-tests/gulpfile.js b/samples/react-ioc-tests/gulpfile.js
new file mode 100644
index 000000000..7958fd5d8
--- /dev/null
+++ b/samples/react-ioc-tests/gulpfile.js
@@ -0,0 +1,7 @@
+'use strict';
+
+const gulp = require('gulp');
+const build = require('@microsoft/sp-build-web');
+build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);
+
+build.initialize(gulp);
diff --git a/samples/react-ioc-tests/jest/cobertura-coverage.xml b/samples/react-ioc-tests/jest/cobertura-coverage.xml
new file mode 100644
index 000000000..0808d4f81
--- /dev/null
+++ b/samples/react-ioc-tests/jest/cobertura-coverage.xml
@@ -0,0 +1,397 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/coverage-final.json b/samples/react-ioc-tests/jest/coverage-final.json
new file mode 100644
index 000000000..9c55a899e
--- /dev/null
+++ b/samples/react-ioc-tests/jest/coverage-final.json
@@ -0,0 +1,8 @@
+{"C:\\PWR\\Repos\\SPFxIoCTests\\src\\common\\providers\\Cache\\ICacheProvider.ts": {"path":"C:\\PWR\\Repos\\SPFxIoCTests\\src\\common\\providers\\Cache\\ICacheProvider.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":8,"column":1}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":13}},"2":{"start":{"line":4,"column":4},"end":{"line":4,"column":9}},"3":{"start":{"line":5,"column":4},"end":{"line":5,"column":11}},"4":{"start":{"line":6,"column":4},"end":{"line":6,"column":8}},"5":{"start":{"line":7,"column":4},"end":{"line":7,"column":12}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":0},"end":{"line":2,"column":11}},"loc":{"start":{"line":2,"column":24},"end":{"line":8,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":12},"end":{"line":2,"column":24}},"type":"binary-expr","locations":[{"start":{"line":2,"column":12},"end":{"line":2,"column":24}},{"start":{"line":2,"column":12},"end":{"line":2,"column":24}}]}},"s":{"0":3,"1":3,"2":3,"3":3,"4":3,"5":3},"f":{"0":3},"b":{"0":[3,3]}}
+,"C:\\PWR\\Repos\\SPFxIoCTests\\src\\common\\providers\\Cache\\StorageCacheProvider.ts": {"path":"C:\\PWR\\Repos\\SPFxIoCTests\\src\\common\\providers\\Cache\\StorageCacheProvider.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":63}},"1":{"start":{"line":3,"column":0},"end":{"line":120,"column":0}},"2":{"start":{"line":7,"column":16},"end":{"line":7,"column":56}},"3":{"start":{"line":4,"column":12},"end":{"line":4,"column":45}},"4":{"start":{"line":8,"column":8},"end":{"line":8,"column":31}},"5":{"start":{"line":11,"column":11},"end":{"line":26,"column":5}},"6":{"start":{"line":12,"column":40},"end":{"line":12,"column":45}},"7":{"start":{"line":13,"column":41},"end":{"line":13,"column":137}},"8":{"start":{"line":14,"column":8},"end":{"line":24,"column":9}},"9":{"start":{"line":16,"column":12},"end":{"line":23,"column":13}},"10":{"start":{"line":17,"column":40},"end":{"line":17,"column":75}},"11":{"start":{"line":18,"column":16},"end":{"line":18,"column":44}},"12":{"start":{"line":19,"column":16},"end":{"line":19,"column":49}},"13":{"start":{"line":20,"column":16},"end":{"line":20,"column":40}},"14":{"start":{"line":25,"column":8},"end":{"line":25,"column":32}},"15":{"start":{"line":28,"column":17},"end":{"line":40,"column":5}},"16":{"start":{"line":29,"column":8},"end":{"line":29,"column":45}},"17":{"start":{"line":30,"column":12},"end":{"line":30,"column":41}},"18":{"start":{"line":31,"column":8},"end":{"line":38,"column":9}},"19":{"start":{"line":32,"column":12},"end":{"line":37,"column":13}},"20":{"start":{"line":33,"column":16},"end":{"line":33,"column":48}},"21":{"start":{"line":34,"column":16},"end":{"line":36,"column":17}},"22":{"start":{"line":35,"column":24},"end":{"line":35,"column":62}},"23":{"start":{"line":39,"column":8},"end":{"line":39,"column":27}},"24":{"start":{"line":42,"column":17},"end":{"line":64,"column":5}},"25":{"start":{"line":42,"column":49},"end":{"line":42,"column":98}},"26":{"start":{"line":43,"column":8},"end":{"line":43,"column":45}},"27":{"start":{"line":44,"column":12},"end":{"line":44,"column":43}},"28":{"start":{"line":45,"column":8},"end":{"line":62,"column":9}},"29":{"start":{"line":47,"column":16},"end":{"line":47,"column":44}},"30":{"start":{"line":48,"column":12},"end":{"line":54,"column":13}},"31":{"start":{"line":49,"column":16},"end":{"line":49,"column":38}},"32":{"start":{"line":50,"column":19},"end":{"line":54,"column":13}},"33":{"start":{"line":51,"column":16},"end":{"line":51,"column":54}},"34":{"start":{"line":53,"column":16},"end":{"line":53,"column":43}},"35":{"start":{"line":57,"column":12},"end":{"line":57,"column":43}},"36":{"start":{"line":58,"column":18},"end":{"line":58,"column":80}},"37":{"start":{"line":60,"column":12},"end":{"line":60,"column":106}},"38":{"start":{"line":61,"column":12},"end":{"line":61,"column":33}},"39":{"start":{"line":63,"column":8},"end":{"line":63,"column":29}},"40":{"start":{"line":66,"column":17},"end":{"line":70,"column":5}},"41":{"start":{"line":67,"column":8},"end":{"line":67,"column":45}},"42":{"start":{"line":68,"column":8},"end":{"line":68,"column":37}},"43":{"start":{"line":69,"column":8},"end":{"line":69,"column":56}},"44":{"start":{"line":72,"column":12},"end":{"line":74,"column":5}},"45":{"start":{"line":73,"column":8},"end":{"line":73,"column":31}},"46":{"start":{"line":76,"column":12},"end":{"line":86,"column":5}},"47":{"start":{"line":77,"column":38},"end":{"line":77,"column":42}},"48":{"start":{"line":78,"column":42},"end":{"line":78,"column":78}},"49":{"start":{"line":79,"column":8},"end":{"line":84,"column":9}},"50":{"start":{"line":80,"column":43},"end":{"line":80,"column":74}},"51":{"start":{"line":81,"column":12},"end":{"line":83,"column":13}},"52":{"start":{"line":82,"column":16},"end":{"line":82,"column":39}},"53":{"start":{"line":85,"column":8},"end":{"line":85,"column":30}},"54":{"start":{"line":88,"column":12},"end":{"line":96,"column":5}},"55":{"start":{"line":89,"column":34},"end":{"line":89,"column":36}},"56":{"start":{"line":90,"column":8},"end":{"line":94,"column":9}},"57":{"start":{"line":91,"column":12},"end":{"line":91,"column":57}},"58":{"start":{"line":93,"column":12},"end":{"line":93,"column":30}},"59":{"start":{"line":95,"column":8},"end":{"line":95,"column":27}},"60":{"start":{"line":98,"column":12},"end":{"line":119,"column":5}},"61":{"start":{"line":99,"column":34},"end":{"line":99,"column":39}},"62":{"start":{"line":101,"column":8},"end":{"line":117,"column":9}},"63":{"start":{"line":103,"column":16},"end":{"line":103,"column":31}},"64":{"start":{"line":104,"column":16},"end":{"line":104,"column":22}},"65":{"start":{"line":106,"column":16},"end":{"line":106,"column":36}},"66":{"start":{"line":107,"column":16},"end":{"line":107,"column":22}},"67":{"start":{"line":109,"column":16},"end":{"line":109,"column":41}},"68":{"start":{"line":110,"column":16},"end":{"line":110,"column":22}},"69":{"start":{"line":112,"column":16},"end":{"line":112,"column":46}},"70":{"start":{"line":113,"column":16},"end":{"line":113,"column":22}},"71":{"start":{"line":115,"column":16},"end":{"line":115,"column":41}},"72":{"start":{"line":116,"column":16},"end":{"line":116,"column":22}},"73":{"start":{"line":118,"column":8},"end":{"line":118,"column":23}},"74":{"start":{"line":120,"column":0},"end":{"line":120,"column":1}}},"fnMap":{"0":{"name":"(anonymous_12)","decl":{"start":{"line":3,"column":0},"end":{"line":null,"column":-1}},"loc":{"start":{"line":3,"column":0},"end":{"line":3,"column":-1}}},"1":{"name":"StorageCacheProvider","decl":{"start":{"line":7,"column":4},"end":{"line":7,"column":15}},"loc":{"start":{"line":7,"column":56},"end":{"line":9,"column":5}}},"2":{"name":"(anonymous_14)","decl":{"start":{"line":11,"column":4},"end":{"line":null,"column":-1}},"loc":{"start":{"line":11,"column":4},"end":{"line":26,"column":5}}},"3":{"name":"(anonymous_15)","decl":{"start":{"line":28,"column":4},"end":{"line":28,"column":20}},"loc":{"start":{"line":28,"column":32},"end":{"line":40,"column":5}}},"4":{"name":"(anonymous_18)","decl":{"start":{"line":42,"column":4},"end":{"line":42,"column":20}},"loc":{"start":{"line":42,"column":98},"end":{"line":64,"column":5}}},"5":{"name":"(anonymous_21)","decl":{"start":{"line":66,"column":4},"end":{"line":66,"column":22}},"loc":{"start":{"line":66,"column":34},"end":{"line":70,"column":5}}},"6":{"name":"(anonymous_24)","decl":{"start":{"line":72,"column":4},"end":{"line":72,"column":24}},"loc":{"start":{"line":72,"column":36},"end":{"line":74,"column":5}}},"7":{"name":"(anonymous_25)","decl":{"start":{"line":76,"column":4},"end":{"line":76,"column":26}},"loc":{"start":{"line":76,"column":38},"end":{"line":86,"column":5}}},"8":{"name":"(anonymous_26)","decl":{"start":{"line":88,"column":4},"end":{"line":88,"column":32}},"loc":{"start":{"line":88,"column":44},"end":{"line":96,"column":5}}},"9":{"name":"(anonymous_27)","decl":{"start":{"line":98,"column":4},"end":{"line":98,"column":27}},"loc":{"start":{"line":98,"column":54},"end":{"line":119,"column":5}}}},"branchMap":{"0":{"loc":{"start":{"line":7,"column":16},"end":{"line":7,"column":56}},"type":"if","locations":[{"start":{"line":7,"column":16},"end":{"line":7,"column":56}},{"start":{"line":7,"column":16},"end":{"line":7,"column":56}}]},"1":{"loc":{"start":{"line":13,"column":41},"end":{"line":13,"column":53}},"type":"binary-expr","locations":[{"start":{"line":13,"column":41},"end":{"line":13,"column":53}},{"start":{"line":13,"column":57},"end":{"line":13,"column":61}},{"start":{"line":13,"column":65},"end":{"line":13,"column":97}},{"start":{"line":13,"column":101},"end":{"line":13,"column":137}}]},"2":{"loc":{"start":{"line":14,"column":8},"end":{"line":24,"column":9}},"type":"if","locations":[{"start":{"line":14,"column":8},"end":{"line":24,"column":9}},{"start":{"line":14,"column":8},"end":{"line":24,"column":9}}]},"3":{"loc":{"start":{"line":31,"column":8},"end":{"line":38,"column":9}},"type":"if","locations":[{"start":{"line":31,"column":8},"end":{"line":38,"column":9}},{"start":{"line":31,"column":8},"end":{"line":38,"column":9}}]},"4":{"loc":{"start":{"line":32,"column":12},"end":{"line":37,"column":13}},"type":"if","locations":[{"start":{"line":32,"column":12},"end":{"line":37,"column":13}},{"start":{"line":32,"column":12},"end":{"line":37,"column":13}}]},"5":{"loc":{"start":{"line":34,"column":16},"end":{"line":36,"column":17}},"type":"if","locations":[{"start":{"line":34,"column":16},"end":{"line":36,"column":17}},{"start":{"line":34,"column":16},"end":{"line":36,"column":17}}]},"6":{"loc":{"start":{"line":34,"column":20},"end":{"line":34,"column":51}},"type":"binary-expr","locations":[{"start":{"line":34,"column":20},"end":{"line":34,"column":51}},{"start":{"line":34,"column":56},"end":{"line":34,"column":86}},{"start":{"line":34,"column":90},"end":{"line":34,"column":120}}]},"7":{"loc":{"start":{"line":42,"column":49},"end":{"line":42,"column":98}},"type":"if","locations":[{"start":{"line":42,"column":49},"end":{"line":42,"column":98}},{"start":{"line":42,"column":49},"end":{"line":42,"column":98}}]},"8":{"loc":{"start":{"line":45,"column":8},"end":{"line":62,"column":9}},"type":"if","locations":[{"start":{"line":45,"column":8},"end":{"line":62,"column":9}},{"start":{"line":45,"column":8},"end":{"line":62,"column":9}}]},"9":{"loc":{"start":{"line":48,"column":12},"end":{"line":54,"column":13}},"type":"if","locations":[{"start":{"line":48,"column":12},"end":{"line":54,"column":13}},{"start":{"line":48,"column":12},"end":{"line":54,"column":13}}]},"10":{"loc":{"start":{"line":48,"column":16},"end":{"line":48,"column":33}},"type":"binary-expr","locations":[{"start":{"line":48,"column":16},"end":{"line":48,"column":33}},{"start":{"line":48,"column":37},"end":{"line":48,"column":59}}]},"11":{"loc":{"start":{"line":50,"column":19},"end":{"line":54,"column":13}},"type":"if","locations":[{"start":{"line":50,"column":19},"end":{"line":54,"column":13}},{"start":{"line":50,"column":19},"end":{"line":54,"column":13}}]},"12":{"loc":{"start":{"line":79,"column":8},"end":{"line":84,"column":9}},"type":"if","locations":[{"start":{"line":79,"column":8},"end":{"line":84,"column":9}},{"start":{"line":79,"column":8},"end":{"line":84,"column":9}}]},"13":{"loc":{"start":{"line":79,"column":12},"end":{"line":79,"column":49}},"type":"binary-expr","locations":[{"start":{"line":79,"column":12},"end":{"line":79,"column":49}},{"start":{"line":79,"column":53},"end":{"line":79,"column":81}}]},"14":{"loc":{"start":{"line":81,"column":12},"end":{"line":83,"column":13}},"type":"if","locations":[{"start":{"line":81,"column":12},"end":{"line":83,"column":13}},{"start":{"line":81,"column":12},"end":{"line":83,"column":13}}]},"15":{"loc":{"start":{"line":90,"column":8},"end":{"line":94,"column":9}},"type":"if","locations":[{"start":{"line":90,"column":8},"end":{"line":94,"column":9}},{"start":{"line":90,"column":8},"end":{"line":94,"column":9}}]},"16":{"loc":{"start":{"line":90,"column":12},"end":{"line":90,"column":16}},"type":"binary-expr","locations":[{"start":{"line":90,"column":12},"end":{"line":90,"column":16}},{"start":{"line":90,"column":20},"end":{"line":90,"column":58}}]},"17":{"loc":{"start":{"line":102,"column":12},"end":{"line":104,"column":22}},"type":"switch","locations":[{"start":{"line":102,"column":12},"end":{"line":104,"column":22}},{"start":{"line":105,"column":12},"end":{"line":107,"column":22}},{"start":{"line":108,"column":12},"end":{"line":110,"column":22}},{"start":{"line":111,"column":12},"end":{"line":113,"column":22}},{"start":{"line":114,"column":12},"end":{"line":116,"column":22}}]}},"s":{"0":2,"1":2,"2":19,"3":15,"4":15,"5":2,"6":22,"7":22,"8":22,"9":20,"10":20,"11":20,"12":20,"13":20,"14":22,"15":2,"16":11,"17":11,"18":11,"19":10,"20":8,"21":8,"22":1,"23":11,"24":2,"25":12,"26":11,"27":11,"28":11,"29":10,"30":10,"31":1,"32":9,"33":1,"34":8,"35":10,"36":10,"37":10,"38":10,"39":11,"40":2,"41":1,"42":1,"43":1,"44":2,"45":21,"46":2,"47":10,"48":10,"49":10,"50":9,"51":9,"52":8,"53":10,"54":2,"55":23,"56":23,"57":21,"58":2,"59":23,"60":2,"61":10,"62":10,"63":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":6,"72":6,"73":10,"74":2},"f":{"0":2,"1":15,"2":22,"3":11,"4":11,"5":1,"6":21,"7":10,"8":23,"9":10},"b":{"0":[4,11],"1":[22,20,20,20],"2":[20,2],"3":[10,1],"4":[8,2],"5":[1,7],"6":[8,7,6],"7":[1,10],"8":[10,1],"9":[1,9],"10":[10,9],"11":[1,8],"12":[9,1],"13":[10,9],"14":[8,1],"15":[21,2],"16":[23,23],"17":[1,1,1,1,6]}}
+,"C:\\PWR\\Repos\\SPFxIoCTests\\src\\common\\providers\\DependencyResolver\\DependencyResolver.ts": {"path":"C:\\PWR\\Repos\\SPFxIoCTests\\src\\common\\providers\\DependencyResolver\\DependencyResolver.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":64}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":58}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":66}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":91}},"4":{"start":{"line":9,"column":0},"end":{"line":27,"column":0}},"5":{"start":{"line":16,"column":11},"end":{"line":18,"column":5}},"6":{"start":{"line":17,"column":8},"end":{"line":17,"column":63}},"7":{"start":{"line":20,"column":11},"end":{"line":22,"column":5}},"8":{"start":{"line":21,"column":8},"end":{"line":21,"column":40}},"9":{"start":{"line":24,"column":11},"end":{"line":26,"column":5}},"10":{"start":{"line":25,"column":8},"end":{"line":25,"column":72}},"11":{"start":{"line":27,"column":0},"end":{"line":27,"column":1}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":9,"column":0},"end":{"line":null,"column":-1}},"loc":{"start":{"line":9,"column":0},"end":{"line":9,"column":-1}}},"1":{"name":"(anonymous_2)","decl":{"start":{"line":16,"column":4},"end":{"line":null,"column":-1}},"loc":{"start":{"line":16,"column":4},"end":{"line":18,"column":5}}},"2":{"name":"(anonymous_3)","decl":{"start":{"line":20,"column":4},"end":{"line":null,"column":-1}},"loc":{"start":{"line":20,"column":4},"end":{"line":22,"column":5}}},"3":{"name":"(anonymous_4)","decl":{"start":{"line":24,"column":4},"end":{"line":24,"column":31}},"loc":{"start":{"line":24,"column":46},"end":{"line":26,"column":5}}}},"branchMap":{},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":3,"7":1,"8":3,"9":1,"10":3,"11":1},"f":{"0":4,"1":3,"2":3,"3":3},"b":{}}
+,"C:\\PWR\\Repos\\SPFxIoCTests\\src\\common\\providers\\Log\\ConsoleLogProvider.ts": {"path":"C:\\PWR\\Repos\\SPFxIoCTests\\src\\common\\providers\\Log\\ConsoleLogProvider.ts","statementMap":{"0":{"start":{"line":4,"column":0},"end":{"line":36,"column":0}},"1":{"start":{"line":6,"column":16},"end":{"line":6,"column":53}},"2":{"start":{"line":7,"column":8},"end":{"line":7,"column":37}},"3":{"start":{"line":10,"column":17},"end":{"line":13,"column":5}},"4":{"start":{"line":10,"column":59},"end":{"line":10,"column":80}},"5":{"start":{"line":11,"column":14},"end":{"line":11,"column":60}},"6":{"start":{"line":12,"column":8},"end":{"line":12,"column":80}},"7":{"start":{"line":14,"column":17},"end":{"line":17,"column":5}},"8":{"start":{"line":14,"column":58},"end":{"line":14,"column":79}},"9":{"start":{"line":15,"column":14},"end":{"line":15,"column":60}},"10":{"start":{"line":16,"column":8},"end":{"line":16,"column":79}},"11":{"start":{"line":18,"column":17},"end":{"line":21,"column":5}},"12":{"start":{"line":18,"column":61},"end":{"line":18,"column":82}},"13":{"start":{"line":19,"column":14},"end":{"line":19,"column":60}},"14":{"start":{"line":20,"column":8},"end":{"line":20,"column":79}},"15":{"start":{"line":22,"column":17},"end":{"line":25,"column":5}},"16":{"start":{"line":22,"column":59},"end":{"line":22,"column":80}},"17":{"start":{"line":23,"column":14},"end":{"line":23,"column":60}},"18":{"start":{"line":24,"column":8},"end":{"line":24,"column":80}},"19":{"start":{"line":27,"column":12},"end":{"line":30,"column":5}},"20":{"start":{"line":28,"column":35},"end":{"line":28,"column":69}},"21":{"start":{"line":29,"column":8},"end":{"line":29,"column":26}},"22":{"start":{"line":32,"column":12},"end":{"line":35,"column":5}},"23":{"start":{"line":33,"column":38},"end":{"line":33,"column":76}},"24":{"start":{"line":34,"column":8},"end":{"line":34,"column":24}},"25":{"start":{"line":36,"column":0},"end":{"line":36,"column":1}}},"fnMap":{"0":{"name":"(anonymous_12)","decl":{"start":{"line":4,"column":0},"end":{"line":null,"column":-1}},"loc":{"start":{"line":4,"column":0},"end":{"line":4,"column":-1}}},"1":{"name":"ConsoleLogProvider","decl":{"start":{"line":6,"column":4},"end":{"line":6,"column":15}},"loc":{"start":{"line":6,"column":53},"end":{"line":8,"column":5}}},"2":{"name":"(anonymous_14)","decl":{"start":{"line":10,"column":4},"end":{"line":10,"column":22}},"loc":{"start":{"line":10,"column":80},"end":{"line":13,"column":5}}},"3":{"name":"(anonymous_17)","decl":{"start":{"line":14,"column":4},"end":{"line":14,"column":21}},"loc":{"start":{"line":14,"column":79},"end":{"line":17,"column":5}}},"4":{"name":"(anonymous_20)","decl":{"start":{"line":18,"column":4},"end":{"line":18,"column":24}},"loc":{"start":{"line":18,"column":82},"end":{"line":21,"column":5}}},"5":{"name":"(anonymous_23)","decl":{"start":{"line":22,"column":4},"end":{"line":22,"column":22}},"loc":{"start":{"line":22,"column":80},"end":{"line":25,"column":5}}},"6":{"name":"(anonymous_26)","decl":{"start":{"line":27,"column":4},"end":{"line":27,"column":25}},"loc":{"start":{"line":27,"column":35},"end":{"line":30,"column":5}}},"7":{"name":"(anonymous_27)","decl":{"start":{"line":32,"column":4},"end":{"line":32,"column":23}},"loc":{"start":{"line":32,"column":109},"end":{"line":35,"column":5}}}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":16},"end":{"line":6,"column":53}},"type":"if","locations":[{"start":{"line":6,"column":16},"end":{"line":6,"column":53}},{"start":{"line":6,"column":16},"end":{"line":6,"column":53}}]},"1":{"loc":{"start":{"line":10,"column":59},"end":{"line":10,"column":80}},"type":"if","locations":[{"start":{"line":10,"column":59},"end":{"line":10,"column":80}},{"start":{"line":10,"column":59},"end":{"line":10,"column":80}}]},"2":{"loc":{"start":{"line":14,"column":58},"end":{"line":14,"column":79}},"type":"if","locations":[{"start":{"line":14,"column":58},"end":{"line":14,"column":79}},{"start":{"line":14,"column":58},"end":{"line":14,"column":79}}]},"3":{"loc":{"start":{"line":18,"column":61},"end":{"line":18,"column":82}},"type":"if","locations":[{"start":{"line":18,"column":61},"end":{"line":18,"column":82}},{"start":{"line":18,"column":61},"end":{"line":18,"column":82}}]},"4":{"loc":{"start":{"line":22,"column":59},"end":{"line":22,"column":80}},"type":"if","locations":[{"start":{"line":22,"column":59},"end":{"line":22,"column":80}},{"start":{"line":22,"column":59},"end":{"line":22,"column":80}}]},"5":{"loc":{"start":{"line":28,"column":44},"end":{"line":28,"column":64}},"type":"cond-expr","locations":[{"start":{"line":28,"column":44},"end":{"line":28,"column":64}},{"start":{"line":28,"column":67},"end":{"line":28,"column":69}}]}},"s":{"0":2,"1":14,"2":11,"3":2,"4":3,"5":2,"6":2,"7":2,"8":3,"9":2,"10":2,"11":2,"12":3,"13":2,"14":2,"15":2,"16":3,"17":2,"18":2,"19":2,"20":8,"21":8,"22":2,"23":8,"24":8,"25":2},"f":{"0":2,"1":11,"2":2,"3":2,"4":2,"5":2,"6":8,"7":8},"b":{"0":[3,8],"1":[1,1],"2":[1,1],"3":[1,1],"4":[1,1],"5":[4,4]}}
+,"C:\\PWR\\Repos\\SPFxIoCTests\\src\\common\\services\\Lists\\PnPListsService.ts": {"path":"C:\\PWR\\Repos\\SPFxIoCTests\\src\\common\\services\\Lists\\PnPListsService.ts","statementMap":{"0":{"start":{"line":4,"column":0},"end":{"line":21,"column":0}},"1":{"start":{"line":8,"column":8},"end":{"line":8,"column":33}},"2":{"start":{"line":11,"column":17},"end":{"line":20,"column":5}},"3":{"start":{"line":12,"column":26},"end":{"line":12,"column":51}},"4":{"start":{"line":12,"column":14},"end":{"line":12,"column":51}},"5":{"start":{"line":13,"column":14},"end":{"line":18,"column":11}},"6":{"start":{"line":14,"column":12},"end":{"line":17,"column":14}},"7":{"start":{"line":19,"column":8},"end":{"line":19,"column":21}},"8":{"start":{"line":21,"column":0},"end":{"line":21,"column":1}}},"fnMap":{"0":{"name":"(anonymous_12)","decl":{"start":{"line":4,"column":0},"end":{"line":null,"column":-1}},"loc":{"start":{"line":4,"column":0},"end":{"line":4,"column":-1}}},"1":{"name":"PnPListsService","decl":{"start":{"line":7,"column":4},"end":{"line":7,"column":15}},"loc":{"start":{"line":7,"column":47},"end":{"line":9,"column":5}}},"2":{"name":"(anonymous_14)","decl":{"start":{"line":11,"column":4},"end":{"line":null,"column":-1}},"loc":{"start":{"line":11,"column":4},"end":{"line":20,"column":5}}},"3":{"name":"(anonymous_17)","decl":{"start":{"line":13,"column":36},"end":{"line":13,"column":35}},"loc":{"start":{"line":13,"column":37},"end":{"line":18,"column":9}}}},"branchMap":{},"s":{"0":2,"1":6,"2":2,"3":3,"4":3,"5":3,"6":4,"7":3,"8":2},"f":{"0":2,"1":6,"2":3,"3":4},"b":{}}
+,"C:\\PWR\\Repos\\SPFxIoCTests\\src\\webparts\\iocTests\\IoCTestsWebPartPropsDependencyResolver.ts": {"path":"C:\\PWR\\Repos\\SPFxIoCTests\\src\\webparts\\iocTests\\IoCTestsWebPartPropsDependencyResolver.ts","statementMap":{"0":{"start":{"line":6,"column":0},"end":{"line":6,"column":93}},"1":{"start":{"line":8,"column":0},"end":{"line":26,"column":0}},"2":{"start":{"line":9,"column":11},"end":{"line":25,"column":5}},"3":{"start":{"line":11,"column":25},"end":{"line":11,"column":49}},"4":{"start":{"line":13,"column":44},"end":{"line":13,"column":81}},"5":{"start":{"line":14,"column":46},"end":{"line":14,"column":78}},"6":{"start":{"line":15,"column":42},"end":{"line":15,"column":72}},"7":{"start":{"line":17,"column":41},"end":{"line":22,"column":9}},"8":{"start":{"line":24,"column":8},"end":{"line":24,"column":21}},"9":{"start":{"line":26,"column":0},"end":{"line":26,"column":1}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":8,"column":0},"end":{"line":null,"column":-1}},"loc":{"start":{"line":8,"column":0},"end":{"line":8,"column":-1}}},"1":{"name":"(anonymous_2)","decl":{"start":{"line":9,"column":4},"end":{"line":9,"column":18}},"loc":{"start":{"line":9,"column":68},"end":{"line":25,"column":5}}}},"branchMap":{},"s":{"0":1,"1":1,"2":1,"3":3,"4":3,"5":3,"6":3,"7":3,"8":3,"9":1},"f":{"0":4,"1":3},"b":{}}
+,"C:\\PWR\\Repos\\SPFxIoCTests\\src\\webparts\\iocTests\\components\\ListOfLists.tsx": {"path":"C:\\PWR\\Repos\\SPFxIoCTests\\src\\webparts\\iocTests\\components\\ListOfLists.tsx","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":46}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":93}},"3":{"start":{"line":19,"column":0},"end":{"line":19,"column":56}},"4":{"start":{"line":19,"column":41},"end":{"line":19,"column":94}},"5":{"start":{"line":23,"column":4},"end":{"line":23,"column":16}},"6":{"start":{"line":20,"column":10},"end":{"line":20,"column":44}},"7":{"start":{"line":24,"column":4},"end":{"line":27,"column":6}},"8":{"start":{"line":30,"column":15},"end":{"line":49,"column":3}},"9":{"start":{"line":32,"column":4},"end":{"line":32,"column":81}},"10":{"start":{"line":32,"column":4},"end":{"line":32,"column":82}},"11":{"start":{"line":35,"column":10},"end":{"line":35,"column":43}},"12":{"start":{"line":36,"column":25},"end":{"line":36,"column":69}},"13":{"start":{"line":36,"column":8},"end":{"line":36,"column":69}},"14":{"start":{"line":37,"column":8},"end":{"line":37,"column":14}},"15":{"start":{"line":39,"column":14},"end":{"line":39,"column":54}},"16":{"start":{"line":39,"column":6},"end":{"line":39,"column":55}},"17":{"start":{"line":42,"column":6},"end":{"line":42,"column":79}},"18":{"start":{"line":42,"column":6},"end":{"line":42,"column":80}},"19":{"start":{"line":45,"column":4},"end":{"line":48,"column":7}},"20":{"start":{"line":51,"column":9},"end":{"line":74,"column":3}},"21":{"start":{"line":52,"column":4},"end":{"line":52,"column":65}},"22":{"start":{"line":54,"column":4},"end":{"line":73,"column":6}},"23":{"start":{"line":64,"column":14},"end":{"line":68,"column":16}},"24":{"start":{"line":75,"column":0},"end":{"line":75,"column":1}}},"fnMap":{"0":{"name":"(anonymous_17)","decl":{"start":{"line":19,"column":0},"end":{"line":null,"column":-1}},"loc":{"start":{"line":19,"column":0},"end":{"line":19,"column":-1}}},"1":{"name":"ListOfLists","decl":{"start":{"line":22,"column":2},"end":{"line":22,"column":13}},"loc":{"start":{"line":22,"column":38},"end":{"line":28,"column":3}}},"2":{"name":"(anonymous_19)","decl":{"start":{"line":30,"column":2},"end":{"line":null,"column":-1}},"loc":{"start":{"line":30,"column":2},"end":{"line":49,"column":3}}},"3":{"name":"(anonymous_22)","decl":{"start":{"line":51,"column":2},"end":{"line":null,"column":-1}},"loc":{"start":{"line":51,"column":2},"end":{"line":74,"column":3}}},"4":{"name":"(anonymous_23)","decl":{"start":{"line":63,"column":33},"end":{"line":63,"column":32}},"loc":{"start":{"line":63,"column":34},"end":{"line":69,"column":13}}}},"branchMap":{"0":{"loc":{"start":{"line":23,"column":4},"end":{"line":23,"column":16}},"type":"binary-expr","locations":[{"start":{"line":23,"column":4},"end":{"line":23,"column":16}},{"start":{"line":23,"column":16},"end":{"line":28,"column":2}}]},"1":{"loc":{"start":{"line":57,"column":12},"end":{"line":57,"column":36}},"type":"binary-expr","locations":[{"start":{"line":57,"column":12},"end":{"line":57,"column":36}},{"start":{"line":58,"column":12},"end":{"line":58,"column":47}}]},"2":{"loc":{"start":{"line":60,"column":12},"end":{"line":60,"column":34}},"type":"binary-expr","locations":[{"start":{"line":60,"column":12},"end":{"line":60,"column":34}},{"start":{"line":61,"column":12},"end":{"line":61,"column":37}}]}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":7,"6":7,"7":7,"8":1,"9":13,"10":13,"11":13,"12":13,"13":13,"14":8,"15":5,"16":5,"17":5,"18":5,"19":13,"20":1,"21":20,"22":20,"23":13,"24":1},"f":{"0":1,"1":7,"2":13,"3":20,"4":13},"b":{"0":[7,7],"1":[20,15],"2":[20,7]}}
+}
diff --git a/samples/react-ioc-tests/jest/lcov-report/IocTests.tsx.html b/samples/react-ioc-tests/jest/lcov-report/IocTests.tsx.html
new file mode 100644
index 000000000..3daa4bdbc
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/IocTests.tsx.html
@@ -0,0 +1,269 @@
+
+
+
+ Code coverage report for IocTests.tsx
+
+
+
+
+
+
+
+
+
+
+
+
+ 96%
+ Statements
+ 24/25
+
+
+ 100%
+ Branches
+ 6/6
+
+
+ 100%
+ Functions
+ 5/5
+
+
+ 95%
+ Lines
+ 19/20
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69 | 1x
+1x
+
+1x
+
+
+
+
+
+
+
+
+
+
+
+
+1x
+1x
+
+
+1x
+1x
+
+
+
+
+1x
+
+1x
+
+
+1x
+1x
+
+
+1x
+
+
+1x
+
+
+1x
+
+
+
+
+1x
+2x
+
+2x
+
+
+
+
+
+
+1x
+
+
+
+
+
+
+
+
+
+
+1x
+ | import * as React from 'react';
+import styles from './IocTests.module.scss';
+import IListsService, { IList } from '../../../common/services/Lists/IListsService';
+import ICacheProvider, { CacheTimeout } from '../../../common/providers/Cache/ICacheProvider';
+import ILogProvider from '../../../common/providers/Log/ILogProvider';
+
+export interface IocTestsProps {
+ cacheProvider: ICacheProvider;
+ logProvider: ILogProvider;
+ listsService: IListsService;
+}
+
+export interface IocTestsState {
+ lists: IList[];
+}
+
+export default class IocTests extends React.Component<IocTestsProps, IocTestsState> {
+ private className: string = "IocTests";
+
+ constructor(props: IocTestsProps) {
+ super(props);
+ this.state = {
+ lists: null
+ };
+ }
+
+ public async componentDidMount(): Promise<void> {
+ // LOG PROVIDER
+ await this.props.logProvider.Debug(this.className, "componentDidMount", null);
+
+ // CACHE PROVIDER
+ const cacheKey = "IocTestsGetLists";
+ let lists: IList[] = await this.props.cacheProvider.Get(cacheKey);
+ if (!lists) {
+ // LISTS SERVICE
+ lists = await this.props.listsService.GetLists();
+
+ // CACHE PROVIDER
+ await this.props.cacheProvider.Set(cacheKey, lists, CacheTimeout.default);
+ }
+
+ this.setState({
+ lists: lists
+ });
+ }
+
+ public render(): React.ReactElement<IocTestsProps> {
+ this.props.logProvider.Debug(this.className, "render", null);
+
+ return (
+ <div id={ styles.iocTests } className={ styles.iocTests }>
+ <div className={ styles.container }>
+ { !this.state.lists &&
+ <span> Loading... </span>
+ }
+ { !!this.state.lists && this.state.lists.map(l => {
+ return (
+ <div key={l.Title}>
+ <a href={l.DefaultViewUrl} target={"_blank"}>{l.Title}</a>
+ </div>
+ );
+ })
+ }
+ </div>
+ </div>
+ );
+ }
+}
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/base.css b/samples/react-ioc-tests/jest/lcov-report/base.css
new file mode 100644
index 000000000..417c7adc9
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/base.css
@@ -0,0 +1,212 @@
+body, html {
+ margin:0; padding: 0;
+ height: 100%;
+}
+body {
+ font-family: Helvetica Neue, Helvetica, Arial;
+ font-size: 14px;
+ color:#333;
+}
+.small { font-size: 12px; }
+*, *:after, *:before {
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ box-sizing:border-box;
+ }
+h1 { font-size: 20px; margin: 0;}
+h2 { font-size: 14px; }
+pre {
+ font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ margin: 0;
+ padding: 0;
+ -moz-tab-size: 2;
+ -o-tab-size: 2;
+ tab-size: 2;
+}
+a { color:#0074D9; text-decoration:none; }
+a:hover { text-decoration:underline; }
+.strong { font-weight: bold; }
+.space-top1 { padding: 10px 0 0 0; }
+.pad2y { padding: 20px 0; }
+.pad1y { padding: 10px 0; }
+.pad2x { padding: 0 20px; }
+.pad2 { padding: 20px; }
+.pad1 { padding: 10px; }
+.space-left2 { padding-left:55px; }
+.space-right2 { padding-right:20px; }
+.center { text-align:center; }
+.clearfix { display:block; }
+.clearfix:after {
+ content:'';
+ display:block;
+ height:0;
+ clear:both;
+ visibility:hidden;
+ }
+.fl { float: left; }
+@media only screen and (max-width:640px) {
+ .col3 { width:100%; max-width:100%; }
+ .hide-mobile { display:none!important; }
+}
+
+.quiet {
+ color: #7f7f7f;
+ color: rgba(0,0,0,0.5);
+}
+.quiet a { opacity: 0.7; }
+
+.fraction {
+ font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
+ font-size: 10px;
+ color: #555;
+ background: #E8E8E8;
+ padding: 4px 5px;
+ border-radius: 3px;
+ vertical-align: middle;
+}
+
+div.path a:link, div.path a:visited { color: #333; }
+table.coverage {
+ border-collapse: collapse;
+ margin: 10px 0 0 0;
+ padding: 0;
+}
+
+table.coverage td {
+ margin: 0;
+ padding: 0;
+ vertical-align: top;
+}
+table.coverage td.line-count {
+ text-align: right;
+ padding: 0 5px 0 20px;
+}
+table.coverage td.line-coverage {
+ text-align: right;
+ padding-right: 10px;
+ min-width:20px;
+}
+
+table.coverage td span.cline-any {
+ display: inline-block;
+ padding: 0 5px;
+ width: 100%;
+}
+.missing-if-branch {
+ display: inline-block;
+ margin-right: 5px;
+ border-radius: 3px;
+ position: relative;
+ padding: 0 4px;
+ background: #333;
+ color: yellow;
+}
+
+.skip-if-branch {
+ display: none;
+ margin-right: 10px;
+ position: relative;
+ padding: 0 4px;
+ background: #ccc;
+ color: white;
+}
+.missing-if-branch .typ, .skip-if-branch .typ {
+ color: inherit !important;
+}
+.coverage-summary {
+ border-collapse: collapse;
+ width: 100%;
+}
+.coverage-summary tr { border-bottom: 1px solid #bbb; }
+.keyline-all { border: 1px solid #ddd; }
+.coverage-summary td, .coverage-summary th { padding: 10px; }
+.coverage-summary tbody { border: 1px solid #bbb; }
+.coverage-summary td { border-right: 1px solid #bbb; }
+.coverage-summary td:last-child { border-right: none; }
+.coverage-summary th {
+ text-align: left;
+ font-weight: normal;
+ white-space: nowrap;
+}
+.coverage-summary th.file { border-right: none !important; }
+.coverage-summary th.pct { }
+.coverage-summary th.pic,
+.coverage-summary th.abs,
+.coverage-summary td.pct,
+.coverage-summary td.abs { text-align: right; }
+.coverage-summary td.file { white-space: nowrap; }
+.coverage-summary td.pic { min-width: 120px !important; }
+.coverage-summary tfoot td { }
+
+.coverage-summary .sorter {
+ height: 10px;
+ width: 7px;
+ display: inline-block;
+ margin-left: 0.5em;
+ background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
+}
+.coverage-summary .sorted .sorter {
+ background-position: 0 -20px;
+}
+.coverage-summary .sorted-desc .sorter {
+ background-position: 0 -10px;
+}
+.status-line { height: 10px; }
+/* dark red */
+.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
+.low .chart { border:1px solid #C21F39 }
+/* medium red */
+.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
+/* light red */
+.low, .cline-no { background:#FCE1E5 }
+/* light green */
+.high, .cline-yes { background:rgb(230,245,208) }
+/* medium green */
+.cstat-yes { background:rgb(161,215,106) }
+/* dark green */
+.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
+.high .chart { border:1px solid rgb(77,146,33) }
+
+
+.medium .chart { border:1px solid #666; }
+.medium .cover-fill { background: #666; }
+
+.cbranch-no { background: yellow !important; color: #111; }
+
+.cstat-skip { background: #ddd; color: #111; }
+.fstat-skip { background: #ddd; color: #111 !important; }
+.cbranch-skip { background: #ddd !important; color: #111; }
+
+span.cline-neutral { background: #eaeaea; }
+.medium { background: #eaeaea; }
+
+.cover-fill, .cover-empty {
+ display:inline-block;
+ height: 12px;
+}
+.chart {
+ line-height: 0;
+}
+.cover-empty {
+ background: white;
+}
+.cover-full {
+ border-right: none !important;
+}
+pre.prettyprint {
+ border: none !important;
+ padding: 0 !important;
+ margin: 0 !important;
+}
+.com { color: #999 !important; }
+.ignore-none { color: #999; font-weight: normal; }
+
+.wrapper {
+ min-height: 100%;
+ height: auto !important;
+ height: 100%;
+ margin: 0 auto -48px;
+}
+.footer, .push {
+ height: 48px;
+}
diff --git a/samples/react-ioc-tests/jest/lcov-report/common/providers/Cache/ICacheProvider.ts.html b/samples/react-ioc-tests/jest/lcov-report/common/providers/Cache/ICacheProvider.ts.html
new file mode 100644
index 000000000..c9e90ebe5
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/common/providers/Cache/ICacheProvider.ts.html
@@ -0,0 +1,104 @@
+
+
+
+ Code coverage report for common/providers/Cache/ICacheProvider.ts
+
+
+
+
+
+
+
+
+
+
+
+
+ 100%
+ Statements
+ 6/6
+
+
+ 100%
+ Branches
+ 2/2
+
+
+ 100%
+ Functions
+ 1/1
+
+
+ 100%
+ Lines
+ 6/6
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14 |
+3x
+3x
+3x
+3x
+3x
+3x
+
+
+
+
+
+
+ |
+export enum CacheTimeout {
+ oneSecond,
+ short,
+ default,
+ long,
+ verylong
+}
+
+export default interface ICacheProvider {
+ Get(key: string): Promise<any>;
+ Set(key: string, valueObj: any, cacheTimeout: CacheTimeout): Promise<boolean>;
+ Clear(key: string): Promise<void>;
+} |
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/common/providers/Cache/MockCacheProvider.ts.html b/samples/react-ioc-tests/jest/lcov-report/common/providers/Cache/MockCacheProvider.ts.html
new file mode 100644
index 000000000..25a2331d1
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/common/providers/Cache/MockCacheProvider.ts.html
@@ -0,0 +1,125 @@
+
+
+
+ Code coverage report for common/providers/Cache/MockCacheProvider.ts
+
+
+
+
+
+
+
+
+
+
+
+
+ 100%
+ Statements
+ 10/10
+
+
+ 100%
+ Branches
+ 0/0
+
+
+ 80%
+ Functions
+ 4/5
+
+
+ 100%
+ Lines
+ 10/10
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21 |
+
+2x
+6x
+
+
+6x
+
+
+2x
+9x
+
+2x
+5x
+5x
+
+2x
+
+
+
+2x | import ICacheProvider, { CacheTimeout } from "./ICacheProvider";
+
+export default class MockCacheProvider implements ICacheProvider {
+ private valueObj: any = null;
+
+ constructor(valueObj?: any) {
+ this.valueObj = valueObj;
+ }
+
+ public async Get(key: string): Promise<any> {
+ return this.valueObj;
+ }
+ public async Set(key: string, valueObj: any, cacheTimeout: CacheTimeout): Promise<boolean> {
+ this.valueObj = valueObj;
+ return true;
+ }
+ public async Clear(key: string): Promise<void> {
+ // do nothing
+ }
+
+} |
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/common/providers/Cache/MockStorage.ts.html b/samples/react-ioc-tests/jest/lcov-report/common/providers/Cache/MockStorage.ts.html
new file mode 100644
index 000000000..8b0b9176a
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/common/providers/Cache/MockStorage.ts.html
@@ -0,0 +1,146 @@
+
+
+
+ Code coverage report for common/providers/Cache/MockStorage.ts
+
+
+
+
+
+
+
+
+
+
+
+
+ 66.67%
+ Statements
+ 10/15
+
+
+ 50%
+ Branches
+ 1/2
+
+
+ 42.86%
+ Functions
+ 3/7
+
+
+ 66.67%
+ Lines
+ 10/15
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28 | 1x
+
+1x
+1x
+
+
+
+
+
+
+
+
+1x
+
+
+1x
+
+
+1x
+
+
+1x
+2x
+
+1x
+
+
+1x | export default class MockStorage implements Storage {
+ constructor(storedKey?: string, storedItem?: any) {
+ this.length = 0;
+ Iif (!!storedKey) {
+ this[storedKey] = storedItem;
+ this.length = 1;
+ }
+ }
+
+ [name: string]: any;
+ length: number;
+
+ public clear(): void {
+ // do nothing
+ }
+ public getItem(key: string): string {
+ return this[key];
+ }
+ public key(index: number): string {
+ return "";
+ }
+ public removeItem(key: string): void {
+ this[key] = undefined;
+ }
+ public setItem(key: string, value: string): void {
+ this[key] = value;
+ }
+} |
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/common/providers/Cache/StorageCacheProvider.ts.html b/samples/react-ioc-tests/jest/lcov-report/common/providers/Cache/StorageCacheProvider.ts.html
new file mode 100644
index 000000000..3170cfabd
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/common/providers/Cache/StorageCacheProvider.ts.html
@@ -0,0 +1,422 @@
+
+
+
+ Code coverage report for common/providers/Cache/StorageCacheProvider.ts
+
+
+
+
+
+
+
+
+
+
+
+
+ 100%
+ Statements
+ 75/75
+
+
+ 100%
+ Branches
+ 42/42
+
+
+ 100%
+ Functions
+ 10/10
+
+
+ 100%
+ Lines
+ 74/74
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120 | 2x
+
+2x
+15x
+
+
+19x
+15x
+
+
+2x
+22x
+22x
+22x
+
+20x
+20x
+20x
+20x
+20x
+
+
+
+
+22x
+
+
+2x
+11x
+11x
+11x
+10x
+8x
+8x
+1x
+
+
+
+11x
+
+
+12x
+11x
+11x
+11x
+
+10x
+10x
+1x
+9x
+1x
+
+8x
+
+
+
+10x
+10x
+
+10x
+10x
+
+11x
+
+
+2x
+1x
+1x
+1x
+
+
+2x
+21x
+
+
+2x
+10x
+10x
+10x
+9x
+9x
+8x
+
+
+10x
+
+
+2x
+23x
+23x
+21x
+
+2x
+
+23x
+
+
+2x
+10x
+
+10x
+
+1x
+1x
+
+1x
+1x
+
+1x
+1x
+
+1x
+1x
+
+6x
+6x
+
+10x
+
+2x | import ICacheProvider, { CacheTimeout } from "./ICacheProvider";
+
+export default class StorageCacheProvider implements ICacheProvider {
+ private cacheKeyPrefix: string = "__E2.";
+ private storage: Storage;
+
+ constructor(storage: Storage = window.sessionStorage) {
+ this.storage = storage;
+ }
+
+ public IsSupportStorage(): boolean {
+ let isSupportStorage: boolean = false;
+ const supportsStorage: boolean = this.storage && JSON && typeof JSON.parse === "function" && typeof JSON.stringify === "function";
+ if (supportsStorage) {
+ // check for dodgy behaviour from iOS Safari in private browsing mode
+ try {
+ const testKey: string = "e2-cache-isSupportStorage-testKey";
+ this.storage[testKey] = "1";
+ this.storage.removeItem(testKey);
+ isSupportStorage = true;
+ } catch (ex) {
+ // private browsing mode in iOS Safari, or possible full cache
+ }
+ }
+ return isSupportStorage;
+ }
+
+ public async Get(key: string): Promise<any> {
+ key = this.ensureCacheKeyPrefix(key);
+ let returnValue: any = undefined;
+ if (this.IsSupportStorage()) {
+ if (!this.isCacheExpired(key)) {
+ returnValue = this.storage[key];
+ if (typeof returnValue === "string" && (returnValue.indexOf("{") === 0 || returnValue.indexOf("[") === 0)) {
+ returnValue = JSON.parse(returnValue);
+ }
+ }
+ }
+ return returnValue;
+ }
+
+ public async Set(key: string, valueObj: any, cacheTimeout: CacheTimeout = CacheTimeout.default): Promise<boolean> {
+ key = this.ensureCacheKeyPrefix(key);
+ let didSetInCache: boolean = false;
+ if (this.IsSupportStorage()) {
+ // get value as a string
+ let cacheValue: any = undefined;
+ if (valueObj === null || valueObj === undefined) {
+ cacheValue = valueObj;
+ } else if (typeof valueObj === "object") {
+ cacheValue = JSON.stringify(valueObj);
+ } else {
+ cacheValue = `${valueObj}`;
+ }
+
+ // cache value
+ this.storage[key] = cacheValue;
+ const validityPeriodMs: number = this.getCacheTimeout(cacheTimeout);
+ // cache expiry
+ this.storage[this.getExpiryKey(key)] = ((new Date()).getTime() + validityPeriodMs).toString();
+ didSetInCache = true;
+ }
+ return didSetInCache;
+ }
+
+ public async Clear(key: string): Promise<void> {
+ key = this.ensureCacheKeyPrefix(key);
+ this.storage.removeItem(key);
+ this.storage.removeItem(this.getExpiryKey(key));
+ }
+
+ private getExpiryKey(key: string): string {
+ return key + "_expiry";
+ }
+
+ private isCacheExpired(key: string): boolean {
+ let isCacheExpired: boolean = true;
+ const cacheExpiryString: string = this.storage[this.getExpiryKey(key)];
+ if (typeof cacheExpiryString === "string" && cacheExpiryString.length > 0) {
+ const cacheExpiryInt: number = parseInt(cacheExpiryString, 10);
+ if (cacheExpiryInt > (new Date()).getTime()) {
+ isCacheExpired = false;
+ }
+ }
+ return isCacheExpired;
+ }
+
+ private ensureCacheKeyPrefix(key: string): string {
+ let prefixedKey: string = "";
+ if (!key || key.indexOf(this.cacheKeyPrefix) !== 0) {
+ prefixedKey = `${this.cacheKeyPrefix}${key}`;
+ } else {
+ prefixedKey = key;
+ }
+ return prefixedKey;
+ }
+
+ private getCacheTimeout(cacheTimeout: CacheTimeout): number {
+ const oneMinute: number = 60000;
+ let timeout: number;
+ switch (cacheTimeout) {
+ case CacheTimeout.oneSecond:
+ timeout = 1000;
+ break;
+ case CacheTimeout.short:
+ timeout = oneMinute;
+ break;
+ case CacheTimeout.long:
+ timeout = oneMinute * 60; // 1 hour
+ break;
+ case CacheTimeout.verylong:
+ timeout = oneMinute * 60 * 24; // 24 hours
+ break;
+ default:
+ timeout = oneMinute * 10; // 10 minutes
+ break;
+ }
+ return timeout;
+ }
+} |
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/common/providers/Cache/index.html b/samples/react-ioc-tests/jest/lcov-report/common/providers/Cache/index.html
new file mode 100644
index 000000000..d2325e1e6
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/common/providers/Cache/index.html
@@ -0,0 +1,106 @@
+
+
+
+ Code coverage report for common/providers/Cache
+
+
+
+
+
+
+
+
+
+
+ All files common/providers/Cache
+
+
+
+ 100%
+ Statements
+ 81/81
+
+
+ 100%
+ Branches
+ 44/44
+
+
+ 100%
+ Functions
+ 11/11
+
+
+ 100%
+ Lines
+ 80/80
+
+
+
+
+
+
+
+
+ File |
+ |
+ Statements |
+ |
+ Branches |
+ |
+ Functions |
+ |
+ Lines |
+ |
+
+
+
+ ICacheProvider.ts |
+ |
+ 100% |
+ 6/6 |
+ 100% |
+ 2/2 |
+ 100% |
+ 1/1 |
+ 100% |
+ 6/6 |
+
+
+
+ StorageCacheProvider.ts |
+ |
+ 100% |
+ 75/75 |
+ 100% |
+ 42/42 |
+ 100% |
+ 10/10 |
+ 100% |
+ 74/74 |
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/common/providers/DependencyResolver/DependencyResolver.ts.html b/samples/react-ioc-tests/jest/lcov-report/common/providers/DependencyResolver/DependencyResolver.ts.html
new file mode 100644
index 000000000..fd9ae3b91
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/common/providers/DependencyResolver/DependencyResolver.ts.html
@@ -0,0 +1,143 @@
+
+
+
+ Code coverage report for common/providers/DependencyResolver/DependencyResolver.ts
+
+
+
+
+
+
+
+
+
+
+
+
+ 100%
+ Statements
+ 12/12
+
+
+ 100%
+ Branches
+ 0/0
+
+
+ 100%
+ Functions
+ 4/4
+
+
+ 100%
+ Lines
+ 12/12
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27 | 1x
+1x
+1x
+1x
+
+
+
+
+1x
+
+
+
+
+
+
+1x
+3x
+
+
+1x
+3x
+
+
+1x
+3x
+
+1x | import StorageCacheProvider from "../Cache/StorageCacheProvider";
+import ConsoleLogProvider from "../Log/ConsoleLogProvider";
+import PnPListsService from "../../services/Lists/PnPListsService";
+import PnPListsServiceExecutor from "../../services/Lists/executor/PnPListsServiceExecutor";
+import ICacheProvider from "../Cache/ICacheProvider";
+import ILogProvider from "../Log/ILogProvider";
+import IListsService from "../../services/Lists/IListsService";
+
+export default class DependencyResolver { // implements IDependencyResolver
+ // private useMockServices: boolean;
+
+ // constructor(useMockServices: boolean = false) {
+ // this.useMockServices = useMockServices;
+ // }
+
+ public ResolveICacheProvider(): ICacheProvider {
+ return new StorageCacheProvider(window.sessionStorage);
+ }
+
+ public ResolveILogProvider(): ILogProvider {
+ return new ConsoleLogProvider();
+ }
+
+ public ResolveIListsService(webUrl: string): IListsService {
+ return new PnPListsService(new PnPListsServiceExecutor(webUrl));
+ }
+} |
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/common/providers/DependencyResolver/index.html b/samples/react-ioc-tests/jest/lcov-report/common/providers/DependencyResolver/index.html
new file mode 100644
index 000000000..7c5fd483d
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/common/providers/DependencyResolver/index.html
@@ -0,0 +1,93 @@
+
+
+
+ Code coverage report for common/providers/DependencyResolver
+
+
+
+
+
+
+
+
+
+
+ All files common/providers/DependencyResolver
+
+
+
+ 100%
+ Statements
+ 12/12
+
+
+ 100%
+ Branches
+ 0/0
+
+
+ 100%
+ Functions
+ 4/4
+
+
+ 100%
+ Lines
+ 12/12
+
+
+
+
+
+
+
+
+ File |
+ |
+ Statements |
+ |
+ Branches |
+ |
+ Functions |
+ |
+ Lines |
+ |
+
+
+
+ DependencyResolver.ts |
+ |
+ 100% |
+ 12/12 |
+ 100% |
+ 0/0 |
+ 100% |
+ 4/4 |
+ 100% |
+ 12/12 |
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/common/providers/Log/ConsoleLogProvider.ts.html b/samples/react-ioc-tests/jest/lcov-report/common/providers/Log/ConsoleLogProvider.ts.html
new file mode 100644
index 000000000..c263f7622
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/common/providers/Log/ConsoleLogProvider.ts.html
@@ -0,0 +1,170 @@
+
+
+
+ Code coverage report for common/providers/Log/ConsoleLogProvider.ts
+
+
+
+
+
+
+
+
+
+
+
+
+ 100%
+ Statements
+ 26/26
+
+
+ 100%
+ Branches
+ 12/12
+
+
+ 100%
+ Functions
+ 8/8
+
+
+ 100%
+ Lines
+ 22/22
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36 |
+
+
+2x
+
+14x
+11x
+
+
+3x
+2x
+2x
+
+3x
+2x
+2x
+
+3x
+2x
+2x
+
+3x
+2x
+2x
+
+
+2x
+8x
+8x
+
+
+2x
+8x
+8x
+
+2x | import ILogProvider from "./ILogProvider";
+import IConsole from "./IConsole";
+
+export default class ConsoleLogProvider implements ILogProvider {
+ private consolelog: IConsole;
+ constructor(consolelog: IConsole = window.console) {
+ this.consolelog = consolelog;
+ }
+
+ public async Debug(className: string, message: string, json: any = undefined): Promise<void> {
+ const jsonString: string = this.getJsonString(json);
+ this.internalLog(this.consolelog.debug, className, message, jsonString);
+ }
+ public async Info(className: string, message: string, json: any = undefined): Promise<void> {
+ const jsonString: string = this.getJsonString(json);
+ this.internalLog(this.consolelog.info, className, message, jsonString);
+ }
+ public async Warning(className: string, message: string, json: any = undefined): Promise<void> {
+ const jsonString: string = this.getJsonString(json);
+ this.internalLog(this.consolelog.warn, className, message, jsonString);
+ }
+ public async Error(className: string, message: string, json: any = undefined): Promise<void> {
+ const jsonString: string = this.getJsonString(json);
+ this.internalLog(this.consolelog.error, className, message, jsonString);
+ }
+
+ private getJsonString(json: any): string {
+ const jsonString: string = !!json ? JSON.stringify(json) : "";
+ return jsonString;
+ }
+
+ private internalLog(log: (message:string) => void, className: string, message: string, jsonString: string): void {
+ const logMessage: string = `${className}, ${message}, ${jsonString}`;
+ log(logMessage);
+ }
+} |
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/common/providers/Log/MockLogProvider.ts.html b/samples/react-ioc-tests/jest/lcov-report/common/providers/Log/MockLogProvider.ts.html
new file mode 100644
index 000000000..e6ac93188
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/common/providers/Log/MockLogProvider.ts.html
@@ -0,0 +1,113 @@
+
+
+
+ Code coverage report for common/providers/Log/MockLogProvider.ts
+
+
+
+
+
+
+
+
+
+
+
+
+ 100%
+ Statements
+ 6/6
+
+
+ 100%
+ Branches
+ 0/0
+
+
+ 40%
+ Functions
+ 2/5
+
+
+ 100%
+ Lines
+ 6/6
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17 |
+
+2x
+2x
+
+
+2x
+
+
+2x
+
+
+2x
+
+
+
+2x | import ILogProvider from "./ILogProvider";
+
+export default class MockLogProvider implements ILogProvider {
+ public async Debug(className: string, message: string, json: any): Promise<void> {
+ // do nothing
+ }
+ public async Info(className: string, message: string, json: any): Promise<void> {
+ // do nothing
+ }
+ public async Warning(className: string, message: string, json: any): Promise<void> {
+ // do nothing
+ }
+ public async Error(className: string, message: string, json: any): Promise<void> {
+ // do nothing
+ }
+
+} |
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/common/providers/Log/index.html b/samples/react-ioc-tests/jest/lcov-report/common/providers/Log/index.html
new file mode 100644
index 000000000..03cca1823
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/common/providers/Log/index.html
@@ -0,0 +1,93 @@
+
+
+
+ Code coverage report for common/providers/Log
+
+
+
+
+
+
+
+
+
+
+ All files common/providers/Log
+
+
+
+ 100%
+ Statements
+ 26/26
+
+
+ 100%
+ Branches
+ 12/12
+
+
+ 100%
+ Functions
+ 8/8
+
+
+ 100%
+ Lines
+ 22/22
+
+
+
+
+
+
+
+
+ File |
+ |
+ Statements |
+ |
+ Branches |
+ |
+ Functions |
+ |
+ Lines |
+ |
+
+
+
+ ConsoleLogProvider.ts |
+ |
+ 100% |
+ 26/26 |
+ 100% |
+ 12/12 |
+ 100% |
+ 8/8 |
+ 100% |
+ 22/22 |
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/common/services/Lists/MockListsService.ts.html b/samples/react-ioc-tests/jest/lcov-report/common/services/Lists/MockListsService.ts.html
new file mode 100644
index 000000000..c29ec2018
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/common/services/Lists/MockListsService.ts.html
@@ -0,0 +1,101 @@
+
+
+
+ Code coverage report for common/services/Lists/MockListsService.ts
+
+
+
+
+
+
+
+
+
+
+
+
+ 100%
+ Statements
+ 6/6
+
+
+ 100%
+ Branches
+ 0/0
+
+
+ 100%
+ Functions
+ 3/3
+
+
+ 100%
+ Lines
+ 6/6
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13 |
+
+2x
+6x
+
+
+6x
+
+
+2x
+5x
+
+2x | import IListsService, { IList } from "./IListsService";
+
+export default class MockListsService implements IListsService {
+ private lists: IList[] = [];
+
+ constructor(lists: IList[]) {
+ this.lists = lists;
+ }
+
+ public async GetLists(): Promise<IList[]> {
+ return this.lists;
+ }
+} |
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/common/services/Lists/PnPListsService.ts.html b/samples/react-ioc-tests/jest/lcov-report/common/services/Lists/PnPListsService.ts.html
new file mode 100644
index 000000000..ffd594b75
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/common/services/Lists/PnPListsService.ts.html
@@ -0,0 +1,125 @@
+
+
+
+ Code coverage report for common/services/Lists/PnPListsService.ts
+
+
+
+
+
+
+
+
+
+
+
+
+ 100%
+ Statements
+ 9/9
+
+
+ 100%
+ Branches
+ 0/0
+
+
+ 100%
+ Functions
+ 4/4
+
+
+ 100%
+ Lines
+ 8/8
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21 |
+
+
+2x
+
+
+
+6x
+
+
+2x
+3x
+3x
+4x
+
+
+
+
+3x
+
+2x | import IListsService, { IList } from "./IListsService";
+import IListsServiceExecutor from "./executor/IListsServiceExecutor";
+
+export default class PnPListsService implements IListsService {
+ private executor: IListsServiceExecutor;
+
+ constructor(executor: IListsServiceExecutor) {
+ this.executor = executor;
+ }
+
+ public async GetLists(): Promise<IList[]> {
+ const listsData = await this.executor.Get();
+ const lists = listsData.map(l => {
+ return {
+ Title: l.Title,
+ DefaultViewUrl: l.DefaultViewUrl
+ };
+ });
+ return lists;
+ }
+} |
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/common/services/Lists/index.html b/samples/react-ioc-tests/jest/lcov-report/common/services/Lists/index.html
new file mode 100644
index 000000000..1e14607af
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/common/services/Lists/index.html
@@ -0,0 +1,93 @@
+
+
+
+ Code coverage report for common/services/Lists
+
+
+
+
+
+
+
+
+
+
+ All files common/services/Lists
+
+
+
+ 100%
+ Statements
+ 9/9
+
+
+ 100%
+ Branches
+ 0/0
+
+
+ 100%
+ Functions
+ 4/4
+
+
+ 100%
+ Lines
+ 8/8
+
+
+
+
+
+
+
+
+ File |
+ |
+ Statements |
+ |
+ Branches |
+ |
+ Functions |
+ |
+ Lines |
+ |
+
+
+
+ PnPListsService.ts |
+ |
+ 100% |
+ 9/9 |
+ 100% |
+ 0/0 |
+ 100% |
+ 4/4 |
+ 100% |
+ 8/8 |
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/index.html b/samples/react-ioc-tests/jest/lcov-report/index.html
new file mode 100644
index 000000000..a89f105d6
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/index.html
@@ -0,0 +1,158 @@
+
+
+
+ Code coverage report for All files
+
+
+
+
+
+
+
+
+
+
+ All files
+
+
+
+ 100%
+ Statements
+ 163/163
+
+
+ 100%
+ Branches
+ 62/62
+
+
+ 100%
+ Functions
+ 34/34
+
+
+ 100%
+ Lines
+ 152/152
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/iocTests/IocTestsWebPart.ts.html b/samples/react-ioc-tests/jest/lcov-report/iocTests/IocTestsWebPart.ts.html
new file mode 100644
index 000000000..439c53237
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/iocTests/IocTestsWebPart.ts.html
@@ -0,0 +1,317 @@
+
+
+
+ Code coverage report for iocTests/IocTestsWebPart.ts
+
+
+
+
+
+
+
+
+
+
+
+
+ 0%
+ Statements
+ 0/28
+
+
+ 0%
+ Branches
+ 0/8
+
+
+ 0%
+ Functions
+ 0/5
+
+
+ 0%
+ Lines
+ 0/27
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85 |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | import * as React from 'react';
+import * as ReactDom from 'react-dom';
+import { Version, Environment, EnvironmentType } from '@microsoft/sp-core-library';
+import {
+ BaseClientSideWebPart,
+ IPropertyPaneConfiguration,
+ PropertyPaneTextField
+} from '@microsoft/sp-webpart-base';
+
+import * as strings from 'IocTestsWebPartStrings';
+import IocTests, { IocTestsProps } from './components/IocTests';
+import PnPListsService from '../../common/services/Lists/PnPListsService';
+import IListsService from '../../common/services/Lists/IListsService';
+import MockListsService from '../../common/services/Lists/MockListsService';
+import ICacheProvider from '../../common/providers/Cache/ICacheProvider';
+import MockCacheProvider from '../../common/providers/Cache/MockCacheProvider';
+import StorageCacheProvider, { StorageType } from '../../common/providers/Cache/StorageCacheProvider';
+import ILogProvider from '../../common/providers/Log/ILogProvider';
+import MockLogProvider from '../../common/providers/Log/MockLogProvider';
+import ConsoleLogProvider from '../../common/providers/Log/ConsoleLogProvider';
+
+export interface IIocTestsWebPartProps {
+ description: string;
+}
+
+export default class IocTestsWebPart extends BaseClientSideWebPart<IIocTestsWebPartProps> {
+
+ public render(): void {
+ const useMockServices = Environment.type !== EnvironmentType.SharePoint && Environment.type !== EnvironmentType.ClassicSharePoint;
+
+ const listsService: IListsService = useMockServices
+ ? new MockListsService([{ Title: "Mocked List", DefaultViewUrl: "https://bing.com" }])
+ : new PnPListsService(this.context.pageContext.web.absoluteUrl);
+
+ const cacheProvider: ICacheProvider = useMockServices
+ ? new MockCacheProvider()
+ : new StorageCacheProvider(StorageType.local);
+
+ const logProvider: ILogProvider = useMockServices
+ ? new MockLogProvider()
+ : new ConsoleLogProvider(this.context);
+
+ const element: React.ReactElement<IocTestsProps> = React.createElement(
+ IocTests,
+ {
+ listsService: listsService,
+ cacheProvider: cacheProvider,
+ logProvider: logProvider
+ }
+ );
+
+ ReactDom.render(element, this.domElement);
+ }
+
+ protected onDispose(): void {
+ ReactDom.unmountComponentAtNode(this.domElement);
+ }
+
+ protected get dataVersion(): Version {
+ return Version.parse('1.0');
+ }
+
+ protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
+ return {
+ pages: [
+ {
+ header: {
+ description: strings.PropertyPaneDescription
+ },
+ groups: [
+ {
+ groupName: strings.BasicGroupName,
+ groupFields: [
+ PropertyPaneTextField('description', {
+ label: strings.DescriptionFieldLabel
+ })
+ ]
+ }
+ ]
+ }
+ ]
+ };
+ }
+}
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/iocTests/components/IocTests.tsx.html b/samples/react-ioc-tests/jest/lcov-report/iocTests/components/IocTests.tsx.html
new file mode 100644
index 000000000..d04c81110
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/iocTests/components/IocTests.tsx.html
@@ -0,0 +1,269 @@
+
+
+
+ Code coverage report for iocTests/components/IocTests.tsx
+
+
+
+
+
+
+
+
+
+
+
+
+ 96%
+ Statements
+ 24/25
+
+
+ 100%
+ Branches
+ 6/6
+
+
+ 100%
+ Functions
+ 5/5
+
+
+ 95%
+ Lines
+ 19/20
+
+
+
+
+
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69 | 1x
+1x
+
+1x
+
+
+
+
+
+
+
+
+
+
+
+
+1x
+1x
+
+
+1x
+1x
+
+
+
+
+1x
+
+1x
+
+
+1x
+1x
+
+
+1x
+
+
+1x
+
+
+1x
+
+
+
+
+1x
+2x
+
+2x
+
+
+
+
+
+
+1x
+
+
+
+
+
+
+
+
+
+
+1x
+ | import * as React from 'react';
+import styles from './IocTests.module.scss';
+import IListsService, { IList } from '../../../common/services/Lists/IListsService';
+import ICacheProvider, { CacheTimeout } from '../../../common/providers/Cache/ICacheProvider';
+import ILogProvider from '../../../common/providers/Log/ILogProvider';
+
+export interface IocTestsProps {
+ cacheProvider: ICacheProvider;
+ logProvider: ILogProvider;
+ listsService: IListsService;
+}
+
+export interface IocTestsState {
+ lists: IList[];
+}
+
+export default class IocTests extends React.Component<IocTestsProps, IocTestsState> {
+ private className: string = "IocTests";
+
+ constructor(props: IocTestsProps) {
+ super(props);
+ this.state = {
+ lists: null
+ };
+ }
+
+ public async componentDidMount(): Promise<void> {
+ // LOG PROVIDER
+ await this.props.logProvider.Debug(this.className, "componentDidMount", null);
+
+ // CACHE PROVIDER
+ const cacheKey = "IocTestsGetLists";
+ let lists: IList[] = await this.props.cacheProvider.Get(cacheKey);
+ if (!lists) {
+ // LISTS SERVICE
+ lists = await this.props.listsService.GetLists();
+
+ // CACHE PROVIDER
+ await this.props.cacheProvider.Set(cacheKey, lists, CacheTimeout.default);
+ }
+
+ this.setState({
+ lists: lists
+ });
+ }
+
+ public render(): React.ReactElement<IocTestsProps> {
+ this.props.logProvider.Debug(this.className, "render", null);
+
+ return (
+ <div id={ styles.iocTests } className={ styles.iocTests }>
+ <div className={ styles.container }>
+ { !this.state.lists &&
+ <span> Loading... </span>
+ }
+ { !!this.state.lists && this.state.lists.map(l => {
+ return (
+ <div key={l.Title}>
+ <a href={l.DefaultViewUrl} target={"_blank"}>{l.Title}</a>
+ </div>
+ );
+ })
+ }
+ </div>
+ </div>
+ );
+ }
+}
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/iocTests/components/index.html b/samples/react-ioc-tests/jest/lcov-report/iocTests/components/index.html
new file mode 100644
index 000000000..df2b590e9
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/iocTests/components/index.html
@@ -0,0 +1,93 @@
+
+
+
+ Code coverage report for iocTests/components
+
+
+
+
+
+
+
+
+
+
+ All files iocTests/components
+
+
+
+ 96%
+ Statements
+ 24/25
+
+
+ 100%
+ Branches
+ 6/6
+
+
+ 100%
+ Functions
+ 5/5
+
+
+ 95%
+ Lines
+ 19/20
+
+
+
+
+
+
+
+
+ File |
+ |
+ Statements |
+ |
+ Branches |
+ |
+ Functions |
+ |
+ Lines |
+ |
+
+
+
+ IocTests.tsx |
+ |
+ 96% |
+ 24/25 |
+ 100% |
+ 6/6 |
+ 100% |
+ 5/5 |
+ 95% |
+ 19/20 |
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/iocTests/index.html b/samples/react-ioc-tests/jest/lcov-report/iocTests/index.html
new file mode 100644
index 000000000..d1e290814
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/iocTests/index.html
@@ -0,0 +1,93 @@
+
+
+
+ Code coverage report for iocTests
+
+
+
+
+
+
+
+
+
+
+
+
+ 0%
+ Statements
+ 0/28
+
+
+ 0%
+ Branches
+ 0/8
+
+
+ 0%
+ Functions
+ 0/5
+
+
+ 0%
+ Lines
+ 0/27
+
+
+
+
+
+
+
+
+ File |
+ |
+ Statements |
+ |
+ Branches |
+ |
+ Functions |
+ |
+ Lines |
+ |
+
+
+
+ IocTestsWebPart.ts |
+ |
+ 0% |
+ 0/28 |
+ 0% |
+ 0/8 |
+ 0% |
+ 0/5 |
+ 0% |
+ 0/27 |
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/react-ioc-tests/jest/lcov-report/prettify.css b/samples/react-ioc-tests/jest/lcov-report/prettify.css
new file mode 100644
index 000000000..b317a7cda
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/prettify.css
@@ -0,0 +1 @@
+.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
diff --git a/samples/react-ioc-tests/jest/lcov-report/prettify.js b/samples/react-ioc-tests/jest/lcov-report/prettify.js
new file mode 100644
index 000000000..ef51e0386
--- /dev/null
+++ b/samples/react-ioc-tests/jest/lcov-report/prettify.js
@@ -0,0 +1 @@
+window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^
+
+
+