Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterp committed Jul 20, 2020
1 parent 99de5d6 commit 78163a9
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = {
],
/**
* NOTE
* Experimental decorators are used in `@redwoodjs/project-model`.
* Experimental decorators are used in `@redwoodjs/structure`.
* https://github.com/tc39/proposal-decorators
**/
['@babel/plugin-proposal-decorators', { legacy: true }],
Expand Down
8 changes: 8 additions & 0 deletions packages/cli/src/commands/destroy/cell/__tests__/cell.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ jest.mock('src/lib', () => {
}
})

jest.mock('@redwoodjs/structure', () => {
return {
getProject: () => ({
cells: [{ queryOperationName: undefined }],
}),
}
})

import fs from 'fs'

import 'src/lib/test'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ import path from 'path'

import { loadGeneratorFixture } from 'src/lib/test'

jest.mock('@redwoodjs/structure', () => {
return {
getProject: () => ({
cells: [{ queryOperationName: undefined }],
}),
}
})

import * as cell from '../cell'

let singleWordFiles, multiWordFiles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getDefaultArgs } from 'src/lib'
import { yargsDefaults as defaults } from '../../../generate'
import * as scaffold from '../scaffold'

describe('in javascript (defualt) mode', () => {
describe('in javascript (default) mode', () => {
let files

beforeAll(async () => {
Expand Down
14 changes: 14 additions & 0 deletions packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "../../tsconfig.compilerOption.json",
"compilerOptions": {
"tsBuildInfoFile": "dist/tsconfig.tsbuildinfo",
"baseUrl": ".",
"rootDir": "src",
"outDir": "dist"
},
"include": ["src"],
"references": [
{ "path": "../internal" },
{ "path": "../structure" },
]
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{ "path": "packages/internal" },
{ "path": "packages/auth" },
{ "path": "packages/testing" },
{ "path": "packages/project-model" }
{ "path": "packages/structure" }
],
"files": []
}

0 comments on commit 78163a9

Please sign in to comment.