diff --git a/package.json b/package.json index a25b256..1e25dfc 100644 --- a/package.json +++ b/package.json @@ -890,6 +890,13 @@ "5.3.4": { "version": "5.3.3", "reason": "https://github.com/styled-components/styled-components/issues/3706" + }, + "5.3.5": { + "version": "5.3.5", + "scripts": { + "postinstall": "" + }, + "reason": "https://github.com/styled-components/styled-components/commit/ba9d732ca7da53f2a095e35450ecffd592c6f5ba" } } } @@ -902,6 +909,7 @@ "find-duplicated-property-keys": "^1.2.7", "git-contributor": "^1.0.10", "husky": "^4.2.5", + "node-core-test": "^1.1.0", "semantic-release": "^17.3.9" }, "ci": { diff --git a/test.js b/test.js index d25fac6..47aed06 100644 --- a/test.js +++ b/test.js @@ -1,35 +1,42 @@ 'use strict'; const assert = require('assert'); +const test = require('node-core-test') const bugVersions = require('.'); -let pkgCount = 0; -let versionCount = 0; -for (const name in bugVersions) { - pkgCount++; - const versions = bugVersions[name]; - assert(versions); - for (const version in versions) { - versionCount++; - const item = versions[version]; - assert(item); - assert(item.version || item.dependencies); - if (item.version) { - assert(typeof item.version === 'string'); - } else if (item.dependencies) { - assert(typeof item.dependencies === 'object'); - assert(Object.keys(item.dependencies).length > 0); - } +test('should get bug-versions', () => { + let pkgCount = 0; + let versionCount = 0; + for (const name in bugVersions) { + pkgCount++; + const versions = bugVersions[name]; + assert(versions); + for (const version in versions) { + versionCount++; + const item = versions[version]; + assert(item); + assert(item.version || item.dependencies); + if (item.version) { + assert(typeof item.version === 'string'); + } else if (item.dependencies) { + assert(typeof item.dependencies === 'object'); + assert(Object.keys(item.dependencies).length > 0); + } - assert(item.reason) - assert(typeof item.reason === 'string'); + assert(item.reason) + assert(typeof item.reason === 'string'); + } } -} -console.log('Total: %d bug pkgs and %d bug versions', pkgCount, versionCount); -console.log(''); + console.log('Total: %d bug pkgs and %d bug versions', pkgCount, versionCount); + assert(pkgCount > 0); + assert(versionCount > 0); +}); -const pkg = require('./package'); -console.log('unsafe-node-versions: %s', JSON.stringify(pkg.config['unsafe-node-versions'], null, 2)); -console.log(''); -console.log('unsafe-alinode-versions: %s', JSON.stringify(pkg.config['unsafe-alinode-versions'], null, 2)); +test('should get "config" field from package.json', () => { + const pkg = require('./package'); + assert(pkg.config['unsafe-node-versions']); + // console.log('unsafe-node-versions: %s', JSON.stringify(pkg.config['unsafe-node-versions'], null, 2)); + assert(pkg.config['unsafe-alinode-versions']); + // console.log('unsafe-alinode-versions: %s', JSON.stringify(pkg.config['unsafe-alinode-versions'], null, 2)); +});