Skip to content

Commit

Permalink
fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bryans99 committed Nov 23, 2023
1 parent 8a5fa41 commit 433a5b1
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 11 deletions.
5 changes: 4 additions & 1 deletion react/javascript/demo-core-sdk/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@
*/

const transformIgnorePatterns =
'node_modules/@looker/extension-sdk-react|node_modules/@looker/extension-sdk|node_modules/@looker/sdk'

module.exports = {
automock: false,
moduleDirectories: ['./node_modules'],
transformIgnorePatterns: [],
transformIgnorePatterns: [transformIgnorePatterns],
moduleFileExtensions: ['js', 'jsx', 'json'],
restoreMocks: true,
testPathIgnorePatterns: [],
Expand Down
5 changes: 4 additions & 1 deletion react/javascript/demo-embeds/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@
*/

const transformIgnorePatterns =
'node_modules/@looker/extension-sdk-react|node_modules/@looker/extension-sdk|node_modules/@looker/sdk'

module.exports = {
automock: false,
moduleDirectories: ['./node_modules'],
moduleFileExtensions: ['js', 'jsx', 'json'],
restoreMocks: true,
transformIgnorePatterns: [],
transformIgnorePatterns: [transformIgnorePatterns],
testPathIgnorePatterns: [],
globals: {},
}
5 changes: 4 additions & 1 deletion react/javascript/demo-extension-sdk/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@
*/

const transformIgnorePatterns =
'node_modules/@looker/extension-sdk-react|node_modules/@looker/extension-sdk|node_modules/@looker/sdk'

module.exports = {
automock: false,
moduleDirectories: ['./node_modules'],
moduleFileExtensions: ['js', 'jsx', 'json'],
transformIgnorePatterns: [],
transformIgnorePatterns: [transformIgnorePatterns],
restoreMocks: true,
testPathIgnorePatterns: [],
globals: {},
Expand Down
5 changes: 4 additions & 1 deletion react/javascript/demo-external-api/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@
*/

const transformIgnorePatterns =
'node_modules/@looker/extension-sdk-react|node_modules/@looker/extension-sdk|node_modules/@looker/sdk'

module.exports = {
automock: false,
moduleDirectories: ['./node_modules'],
moduleFileExtensions: ['js', 'jsx', 'json'],
restoreMocks: true,
transformIgnorePatterns: [],
transformIgnorePatterns: [transformIgnorePatterns],
testPathIgnorePatterns: [],
globals: {},
}
5 changes: 4 additions & 1 deletion react/javascript/file-download/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@
*/

const transformIgnorePatterns =
'node_modules/@looker/extension-sdk-react|node_modules/@looker/extension-sdk|node_modules/@looker/sdk'

module.exports = {
automock: false,
moduleDirectories: ['./node_modules'],
transformIgnorePatterns: [],
transformIgnorePatterns: [transformIgnorePatterns],
moduleFileExtensions: ['js', 'jsx', 'json'],
restoreMocks: true,
testPathIgnorePatterns: [],
Expand Down
5 changes: 4 additions & 1 deletion react/javascript/file-upload/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@
*/

const transformIgnorePatterns =
'node_modules/@looker/extension-sdk-react|node_modules/@looker/extension-sdk|node_modules/@looker/sdk'

module.exports = {
automock: false,
moduleDirectories: ['./node_modules'],
transformIgnorePatterns: [],
transformIgnorePatterns: [transformIgnorePatterns],
moduleFileExtensions: ['js', 'jsx', 'json'],
restoreMocks: true,
testPathIgnorePatterns: [],
Expand Down
5 changes: 4 additions & 1 deletion react/javascript/helloworld-js/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@
*/

const transformIgnorePatterns =
'node_modules/@looker/extension-sdk-react|node_modules/@looker/extension-sdk|node_modules/@looker/sdk'

module.exports = {
automock: false,
moduleDirectories: ['./node_modules'],
transformIgnorePatterns: [],
transformIgnorePatterns: [transformIgnorePatterns],
moduleFileExtensions: ['js', 'jsx', 'json'],
restoreMocks: true,
testPathIgnorePatterns: [],
Expand Down
5 changes: 4 additions & 1 deletion react/javascript/map-iframe/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@
*/

const transformIgnorePatterns =
'node_modules/@looker/extension-sdk-react|node_modules/@looker/extension-sdk|node_modules/@looker/sdk'

module.exports = {
automock: false,
moduleDirectories: ['./node_modules'],
transformIgnorePatterns: [],
transformIgnorePatterns: [transformIgnorePatterns],
moduleFileExtensions: ['js', 'jsx', 'json'],
restoreMocks: true,
testPathIgnorePatterns: [],
Expand Down
5 changes: 4 additions & 1 deletion react/javascript/tile-sdk/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@
*/

const transformIgnorePatterns =
'node_modules/@looker/extension-sdk-react|node_modules/@looker/extension-sdk|node_modules/@looker/sdk'

module.exports = {
automock: false,
moduleDirectories: ['./node_modules'],
transformIgnorePatterns: [],
transformIgnorePatterns: [transformIgnorePatterns],
moduleFileExtensions: ['js', 'jsx', 'json'],
restoreMocks: true,
testPathIgnorePatterns: [],
Expand Down
5 changes: 4 additions & 1 deletion react/javascript/tile-visualization/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@
*/

const transformIgnorePatterns =
'node_modules/@looker/extension-sdk-react|node_modules/@looker/extension-sdk|node_modules/@looker/sdk'

module.exports = {
automock: false,
moduleDirectories: ['./node_modules'],
transformIgnorePatterns: [],
transformIgnorePatterns: [transformIgnorePatterns],
moduleFileExtensions: ['js', 'jsx', 'json'],
restoreMocks: true,
testPathIgnorePatterns: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { TileExtension } from './TileExtension'
describe('TileExtension', () => {
test('it renders', async () => {
const ok = (result) => result
const all_lookml_models = () => ['cypress_thelook']
const run_inline_query = () => [
{
'order_items.average_sale_price': 62.226985776129474,
Expand All @@ -40,7 +41,7 @@ describe('TileExtension', () => {
renderWithExtensionContext40(
<TileExtension />,
{},
{ coreSDK: { run_inline_query, ok } }
{ coreSDK: { all_lookml_models, run_inline_query, ok } }
)
expect(await screen.findByText('Dashboard Tile')).toBeInTheDocument()
})
Expand Down

0 comments on commit 433a5b1

Please sign in to comment.