mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-02-17 13:20:52 +08:00
fix: unit tests failed caused by project structure change
This commit is contained in:
parent
acfefe49c8
commit
1ed576013b
@ -1,7 +1,8 @@
|
||||
const path = require('path')
|
||||
|
||||
exports.alias = {
|
||||
'naive-ui/lib/icons': path.resolve(__dirname, '../lib/icons')
|
||||
'naive-ui/lib/icons': path.resolve(__dirname, '../lib/icons'),
|
||||
'src': path.resolve(__dirname, '../src')
|
||||
}
|
||||
|
||||
exports.docLoaders = [
|
||||
|
@ -8,7 +8,7 @@ const config = require('./config')
|
||||
const webpackConfig = {
|
||||
mode: 'development',
|
||||
entry: {
|
||||
app: ['./index.js']
|
||||
app: ['./src/index.js']
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(process.cwd(), './dist'),
|
||||
|
@ -6,5 +6,5 @@ import 'regenerator-runtime/runtime'
|
||||
// packagesContext.keys().forEach(packagesContext)
|
||||
|
||||
// require all test files (files that ends with .spec.js)
|
||||
const testsContext = require.context('./specs/packages/common/Pagination', true, /\.spec.js$/)
|
||||
const testsContext = require.context('./specs/src/Pagination', true, /\.spec.js$/)
|
||||
testsContext.keys().forEach(testsContext)
|
||||
|
@ -1,4 +1,4 @@
|
||||
import NButton from 'packages/common/Button'
|
||||
import NButton from 'src/Button'
|
||||
import { mount, createLocalVue } from '@vue/test-utils'
|
||||
import { expect } from 'chai'
|
||||
import sinon from 'sinon'
|
@ -1,4 +1,4 @@
|
||||
import NCheckbox from 'packages/common/Checkbox'
|
||||
import NCheckbox from 'src/Checkbox'
|
||||
import { mount, createLocalVue } from '@vue/test-utils'
|
||||
import { expect } from 'chai'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import NGradientText from 'packages/common/GradientText'
|
||||
import NGradientText from 'src/GradientText'
|
||||
import { mount, createLocalVue } from '@vue/test-utils'
|
||||
import { expect } from 'chai'
|
||||
import { existsInClassList } from '../../utils'
|
||||
import { existsInClassList } from '../utils'
|
||||
|
||||
describe('GradientText', function () {
|
||||
const localVue = createLocalVue()
|
@ -1,7 +1,7 @@
|
||||
import NIcon from 'packages/common/Icon'
|
||||
import NIcon from 'src/Icon'
|
||||
import { mount, createLocalVue } from '@vue/test-utils'
|
||||
import { expect } from 'chai'
|
||||
import { existsInClassList } from '../../utils'
|
||||
import { existsInClassList } from '../utils'
|
||||
|
||||
describe('Icon', function () {
|
||||
const localVue = createLocalVue()
|
@ -1,7 +1,7 @@
|
||||
import NInput from 'packages/common/Input'
|
||||
import NInput from 'src/Input'
|
||||
import { mount, createLocalVue } from '@vue/test-utils'
|
||||
import { expect } from 'chai'
|
||||
import { existsInClassList } from '../../utils'
|
||||
import { existsInClassList } from '../utils'
|
||||
|
||||
describe('Input', function () {
|
||||
const localVue = createLocalVue()
|
@ -1,4 +1,4 @@
|
||||
import { pagesToShow, mapPagesToPageItems, pageItems } from 'packages/common/Pagination/src/utils'
|
||||
import { pagesToShow, mapPagesToPageItems, pageItems } from 'src/Pagination/src/utils'
|
||||
import { expect } from 'chai'
|
||||
|
||||
describe('Pagination', function () {
|
@ -1,8 +1,8 @@
|
||||
import NSelect from 'packages/common/Select'
|
||||
import NSelect from 'src/Select'
|
||||
import { mount, createLocalVue } from '@vue/test-utils'
|
||||
import { expect } from 'chai'
|
||||
import sinon from 'sinon'
|
||||
import { existsInClassList, sleep } from '../../utils'
|
||||
import { existsInClassList, sleep } from '../utils'
|
||||
import _ from 'lodash'
|
||||
|
||||
/**
|
Loading…
Reference in New Issue
Block a user