test: update test config

pull/61/head
amio 2019-10-03 13:33:08 +08:00
rodzic 2d37d4f0c2
commit 997fcb6740
6 zmienionych plików z 14 dodań i 7 usunięć

Wyświetl plik

@ -16,7 +16,7 @@ Fast handcraft svg badge generator. Used on [badgen.net](https://badgen.net).
`npm install badgen`
```javascript
const badgen = require('badgen')
const { badgen } = require('badgen')
// only `status` is required.
const svgString = badgen({

6
package-lock.json wygenerowano
Wyświetl plik

@ -127,6 +127,12 @@
"to-fast-properties": "^2.0.0"
}
},
"@types/node": {
"version": "12.7.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.9.tgz",
"integrity": "sha512-P57oKTJ/vYivL2BCfxCC5tQjlS8qW31pbOL6qt99Yrjm95YdHgNZwjrTTjMBh+C2/y6PXIX4oz253+jUzxKKfQ==",
"dev": true
},
"@zeit/ncc": {
"version": "0.20.5",
"resolved": "https://registry.npmjs.org/@zeit/ncc/-/ncc-0.20.5.tgz",

Wyświetl plik

@ -8,17 +8,17 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"lint": "standard src/*.js",
"bench": "node bench/index.js",
"preview": "node preview/serve.js",
"snaptests": "TAP_SNAPSHOT=1 npm test",
"pretest": "npm run lint && npm run build",
"test": "tap test/*.spec.js --reporter spec --coverage",
"pretest": "npm run build",
"test": "tap test/*.spec.js",
"prebuild": "rm -rf dist",
"build": "ncc -s -m --no-source-map-register build src/index.ts",
"prepublishOnly": "npm run build"
"prepack": "npm run build"
},
"devDependencies": {
"@types/node": "^12.7.9",
"@zeit/ncc": "^0.20.5",
"benchmark": "^2.1.4",
"serve-marked": "^2.0.2",

Wyświetl plik

@ -1,3 +1,4 @@
export { Verdana110 as calcWidth } from './calc-text-width'
import { Verdana110 as calcWidth } from './calc-text-width'
import colorPresets from './color-presets'

Wyświetl plik

@ -1,5 +1,5 @@
const tap = require('tap')
const calcWidth = require('../src/calc-text-width.js').Verdana110
const calcWidth = require('../dist').calcWidth
tap.test('basic functions', t => {
t.ok(typeof calcWidth === 'function', 'export calcWidth function')

Wyświetl plik

@ -1,5 +1,5 @@
const tap = require('tap')
const badgen = require('../src/index.js')
const { badgen } = require('../dist/index.js')
const icons = require('./assets/icon-data-uri.js')
tap.test('generate badge with { label, status }', t => {