-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed generated output for complex dir structure
- Loading branch information
1 parent
bb2d519
commit 7f30258
Showing
36 changed files
with
9,957 additions
and
676 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const { compilerOptions } = require('./tsconfig'); | ||
|
||
module.exports = { | ||
preset: '@nuxt/test-utils', | ||
moduleFileExtensions: ['js', 'ts', 'json'], | ||
testRegex: '(/__tests__/.+|(\\.|/)(test|spec))\\.(jsx?|tsx?)$', | ||
transform: { | ||
'^.+\\.tsx?$': 'ts-jest', | ||
}, | ||
testURL: 'http://localhost/', | ||
collectCoverage: false, | ||
transformIgnorePatterns: ['/node_modules/(?!lodash-es|log-symbols)/'], | ||
globals: { | ||
'ts-jest': { | ||
tsconfig: './tsconfig.json', | ||
}, | ||
}, | ||
testEnvironment: 'jsdom', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export const routerPagesNames = { | ||
activate: 'activate', | ||
rootPage: 'rootPage', | ||
childOne: { | ||
index: 'parent-child-one', | ||
childOneChildOneSubOne: 'parent-child-one-child-one-sub-one', | ||
childOneChildOneSubTwo: 'parent-child-one-child-one-sub-two', | ||
user: { index: 'parent-child-one-child-one-sub-one-user' }, | ||
}, | ||
childTwo: { | ||
index: 'parent-child-two', | ||
childTwoChildOneSubOne: 'parent-child-two-child-one-sub-one', | ||
}, | ||
index: 'index', | ||
all: 'all', | ||
}; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<template> | ||
<Tutorial/> | ||
<div></div> | ||
</template> | ||
|
||
<script> | ||
export default {} | ||
export default {}; | ||
</script> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Init route file should generate to correct tree for the pages folder 1`] = ` | ||
"export const routerPagesNames = { | ||
activate: 'activate', | ||
rootPage: 'rootPage', | ||
childOne: { | ||
index: 'parent-child-one', | ||
childOneChildOneSubOne: 'parent-child-one-child-one-sub-one', | ||
childOneChildOneSubTwo: 'parent-child-one-child-one-sub-two', | ||
user: { index: 'parent-child-one-child-one-sub-one-user' }, | ||
}, | ||
childTwo: { | ||
index: 'parent-child-two', | ||
childTwoChildOneSubOne: 'parent-child-two-child-one-sub-one', | ||
}, | ||
index: 'index', | ||
all: 'all', | ||
}; | ||
" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { createPage, setupTest } from '@nuxt/test-utils'; | ||
import 'core-js'; | ||
import { readFile } from 'fs/promises'; | ||
|
||
describe('Init route file', () => { | ||
setupTest({ | ||
browser: true, | ||
build: true, | ||
setupTimeout: 100000, | ||
rootDir: 'test/fixtures/basic', | ||
config: { | ||
server: { | ||
port: 2310, | ||
}, | ||
}, | ||
}); | ||
it('should generate to correct tree for the pages folder', async () => { | ||
const routeFile = await readFile('test/fixtures/basic/__routes.js', 'utf-8'); | ||
expect(routeFile).toMatchSnapshot(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ | |
"es2017.object", | ||
"es7" | ||
], | ||
"types": ["node"] | ||
"types": ["node", "jest"] | ||
}, | ||
"include": ["./src/**/*.ts"] | ||
} |
Oops, something went wrong.