Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Nov 24, 2021
1 parent 9c6148a commit ee63554
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 7 deletions.
10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
dist
.nuxt
coverage
*.log*
.DS_Store
.code
*.iml
package-lock.json
sw.js
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [12]
node: [14]

steps:
- uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion examples/bridge/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export default defineNuxtConfig({
]
},
modules: [
'../../src'
'../../src/index.ts'
]
})
2 changes: 1 addition & 1 deletion examples/v2/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default {
'@nuxt/typescript-build'
],
modules: [
'../../src'
'../../src/index.ts'
],
svgSprite: {

Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@
"repository": "nuxt-community/svg-sprite-module",
"license": "MIT",
"sideEffects": false,
"main": "dist/module.js",
"types": "dist/types.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
Expand All @@ -16,7 +22,7 @@
"lint": "eslint --ext .ts --ext .vue .",
"prepublishOnly": "yarn build",
"release": "yarn test && standard-version && git push --follow-tags && npm publish",
"test": "yarn lint && yarn jest"
"test": "yarn jest test/module.test.js"
},
"dependencies": {
"chalk": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion test/module.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { setupTest, createPage, url } from '@nuxt/test-utils'

describe('Render module', () => {
setupTest({
fixture: '../playground',
fixture: '../examples/v2',
configFile: 'nuxt.config.ts',
server: true,
browser: true
Expand Down

0 comments on commit ee63554

Please sign in to comment.