@iobroker/legacy-testing 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,12 +5,15 @@ Legacy test modules for ioBroker
5
5
 
6
6
  ## How to replace existing tests
7
7
  1. add to package.json=>devDependencies: `"@iobroker/legacy-testing": "^0.0.4"`
8
- 2. Remove from package.json=>devDependencies: `chai` and `mocha`
8
+ 2. Remove from package.json=>devDependencies: `chai`
9
9
  3. Replace in `tests/testAdapter.js` the code `const setup = require('./lib/setup');` with `const setup = require('@iobroker/legacy-testing');`
10
10
  4. Replace whole file `tests/testPackageFiles.js` with `require('@iobroker/legacy-testing/tests/testPackageFiles');`
11
11
 
12
12
  ## Changelog
13
13
  <!-- ### **WORK IN PROGRESS** -->
14
+ ### 0.1.1 (2022-12-22)
15
+ * (bluefox) Extended testPackageFiles.js with checks
16
+
14
17
  ### 0.1.0 (2022-12-22)
15
18
  * (bluefox) Corrected testPackageFiles.js
16
19
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.0",
2
+ "version": "0.1.1",
3
3
  "name": "@iobroker/legacy-testing",
4
4
  "main": "setup.js",
5
5
  "files": [
@@ -73,6 +73,15 @@ describe('Test package.json and io-package.json', () => {
73
73
  if (ioPackage.common.materialize || (ioPackage.common.adminUI && ioPackage.common.adminUI.conifg === 'materialize')) {
74
74
  expect(fs.existsSync(`${adapterDir}/admin/index_m.html`), 'Admin3 support is enabled in io-package.json, but index_m.html is missing!').to.be.true;
75
75
  }
76
+ if (ioPackage.common.jsonConfig || (ioPackage.common.adminUI && ioPackage.common.adminUI.conifg === 'json')) {
77
+ expect(fs.existsSync(`${adapterDir}/admin/jsonConfig.json`) || fs.existsSync(`${adapterDir}/admin/jsonConfig.json5`), 'Admin3 support is enabled in io-package.json, but jsonConfig.json(5) is missing!').to.be.true;
78
+ }
79
+ if (ioPackage.common.adminUI && ioPackage.common.adminUI.custom === 'json') {
80
+ expect(fs.existsSync(`${adapterDir}/admin/jsonCustom.json`) || fs.existsSync(`${adapterDir}/admin/jsonCustom.json5`), 'Custom config support is enabled in io-package.json, but jsonCustom.json(5) is missing!').to.be.true;
81
+ }
82
+ if (ioPackage.common.adminUI && ioPackage.common.adminUI.tab === 'html') {
83
+ expect(fs.existsSync(`${adapterDir}/admin/tab.html`) || fs.existsSync(`${adapterDir}/admin/tab_m.html`), 'HTML-Tab support is enabled in io-package.json, but tab(_m).html is missing!').to.be.true;
84
+ }
76
85
  }
77
86
 
78
87
  const licenseFileExists = fs.existsSync(`${adapterDir}/LICENSE`);