mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-04-12 14:40:47 +08:00
test(time)
This commit is contained in:
parent
ffb17f84e2
commit
25f72e39ab
@ -18,7 +18,7 @@ module.exports = {
|
||||
collectCoverage: true,
|
||||
|
||||
// An array of glob patterns indicating a set of files for which coverage information should be collected
|
||||
collectCoverageFrom: ['<rootDir>/src/**/*.(ts|tsx)$'],
|
||||
collectCoverageFrom: ['<rootDir>/src/**/*.(ts|tsx)'],
|
||||
|
||||
// The directory where Jest should output its coverage files
|
||||
coverageDirectory: 'coverage',
|
||||
|
@ -20,7 +20,8 @@
|
||||
"format:code": "prettier --write \"(src|demo)/**/*.(vue|js)\"",
|
||||
"format:md": "prettier --write --parser markdown --prose-wrap never \"demo/**/*.md\"",
|
||||
"release:package": "npm run build:package && npm publish --tag next",
|
||||
"test": "cross-env NODE_ENV=test jest",
|
||||
"test": "cross-env NODE_ENV=test jest --coverage=false",
|
||||
"test:cov": "cross-env NODE_ENV=test jest",
|
||||
"gen-version": "node scripts/gen-version",
|
||||
"tusimple:dev": "npm run generate && cross-env NODE_ENV=development webpack-dev-server --config build/webpack.tusimple-dev.js",
|
||||
"tusimple:build:doc": "npm run generate && npm run build && rm -rf build-doc/dist && cross-env NODE_ENV=production webpack --config build/webpack.tusimple-doc.js",
|
||||
|
@ -1,19 +0,0 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import create from '../../create'
|
||||
import { enUS } from '../../locales'
|
||||
import { timeLight } from '../styles'
|
||||
import { NTime } from '../index'
|
||||
|
||||
describe('n-time', () => {
|
||||
const naive = create({
|
||||
locales: [enUS],
|
||||
styles: [timeLight]
|
||||
})
|
||||
it('should work with import on demand', () => {
|
||||
mount(NTime, {
|
||||
global: {
|
||||
plugins: [naive]
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
8
src/time/tests/Time.spec.ts
Normal file
8
src/time/tests/Time.spec.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import { NTime } from '../index'
|
||||
|
||||
describe('n-time', () => {
|
||||
it('should work with import on demand', () => {
|
||||
mount(NTime)
|
||||
})
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user