Skip to content

Commit

Permalink
chore(): update tests config
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshyx committed May 13, 2024
1 parent aa080b2 commit c3fadb5
Show file tree
Hide file tree
Showing 22 changed files with 35 additions and 30 deletions.
14 changes: 4 additions & 10 deletions .circleci/continuation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ parameters:
executors:
shared-executor:
docker:
- image: cimg/node:20.9.0
- image: cimg/base:stable
working_directory: ~/akasha-core

jobs:
Expand All @@ -23,15 +23,9 @@ jobs:
condition: <<pipeline.parameters.affected-projects>>
steps:
- checkout
- restore_cache:
keys:
- dependency-cache-v2-{{ .Branch }}-{{ checksum "yarn.lock" }}
- run:
name: Install nx
command: sudo npm install -g [email protected]
- run:
name: Ensure all packages are available
command: yarn --frozen-lockfile --cache-folder ~/.cache/yarn && yarn build:executors
- node/install:
node-version: '20.11.0'
yarn-version: '4.1.1'
- run:
name: Test affected projects
command: |
Expand Down
2 changes: 1 addition & 1 deletion extensions/apps/antenna/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const baseConfig = require('../../jest.config.base');
const baseConfig = require('../../../jest.config.base');

module.exports = Object.assign(baseConfig, {
automock: false,
Expand Down
2 changes: 1 addition & 1 deletion extensions/apps/antenna/jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../jest.setup';
import './jest.setup';

import { genLoggedInState } from '@akashaorg/af-testing';
import * as loginHooks from '@akashaorg/ui-awf-hooks/lib/use-login.new';
Expand Down
2 changes: 1 addition & 1 deletion extensions/apps/auth-app/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const baseConfig = require('../../jest.config.base');
const baseConfig = require('../../../jest.config.base');

module.exports = Object.assign(baseConfig, {
automock: false,
Expand Down
2 changes: 1 addition & 1 deletion extensions/apps/auth-app/jest.setup.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../jest.setup';
import './jest.setup';
2 changes: 1 addition & 1 deletion extensions/apps/extensions/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const baseConfig = require('../../jest.config.base');
const baseConfig = require('../../../jest.config.base');

module.exports = Object.assign(baseConfig, {
automock: false,
Expand Down
2 changes: 1 addition & 1 deletion extensions/apps/extensions/jest.setup.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../jest.setup';
import './jest.setup';
2 changes: 1 addition & 1 deletion extensions/apps/notifications/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const baseConfig = require('../../jest.config.base');
const baseConfig = require('../../../jest.config.base');

module.exports = Object.assign(baseConfig, {
automock: false,
Expand Down
2 changes: 1 addition & 1 deletion extensions/apps/notifications/jest.setup.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../jest.setup';
import './jest.setup';
2 changes: 1 addition & 1 deletion extensions/apps/profile/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const baseConfig = require('../../jest.config.base');
const baseConfig = require('../../../jest.config.base');

module.exports = Object.assign(baseConfig, {
automock: false,
Expand Down
2 changes: 1 addition & 1 deletion extensions/apps/profile/jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../jest.setup';
import './jest.setup';
import * as mediaHooks from '@akashaorg/ui-awf-hooks/lib/utils/media-utils';
import * as loginHook from '@akashaorg/ui-awf-hooks/lib/use-login.new';
import * as reactUse from 'react-use';
Expand Down
2 changes: 1 addition & 1 deletion extensions/apps/search/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const baseConfig = require('../../jest.config.base');
const baseConfig = require('../../../jest.config.base');

module.exports = Object.assign(baseConfig, {
automock: false,
Expand Down
2 changes: 1 addition & 1 deletion extensions/apps/search/jest.setup.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../jest.setup';
import './jest.setup';
2 changes: 1 addition & 1 deletion extensions/apps/settings/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const baseConfig = require('../../jest.config.base');
const baseConfig = require('../../../jest.config.base');

module.exports = Object.assign(baseConfig, {
automock: false,
Expand Down
2 changes: 1 addition & 1 deletion extensions/apps/settings/jest.setup.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../jest.setup';
import './jest.setup';
2 changes: 1 addition & 1 deletion extensions/apps/vibes-console/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const baseConfig = require('../../jest.config.base');
const baseConfig = require('../../../jest.config.base');

module.exports = Object.assign(baseConfig, {
automock: false,
Expand Down
4 changes: 2 additions & 2 deletions extensions/apps/vibes-console/jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import '../jest.setup';
import './jest.setup';

jest.mock('@tanstack/react-router', () => ({
...jest.requireActual('@tanstack/react-router'),
useNavigate: jest.fn().mockImplementation(() => {
return jest.fn();
}),
}));
}));
2 changes: 1 addition & 1 deletion extensions/apps/vibes/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const baseConfig = require('../../jest.config.base');
const baseConfig = require('../../../jest.config.base');

module.exports = Object.assign(baseConfig, {
automock: false,
Expand Down
2 changes: 1 addition & 1 deletion extensions/apps/vibes/jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../jest.setup';
import './jest.setup';

jest.mock('@tanstack/react-router', () => ({
...jest.requireActual('@tanstack/react-router'),
Expand Down
2 changes: 1 addition & 1 deletion extensions/widgets/analytics/jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../jest.setup';
import './jest.setup';
import { mockSDK } from '@akashaorg/af-testing';

jest.mock('@akashaorg/awf-sdk', () => {
Expand Down
5 changes: 5 additions & 0 deletions extensions/widgets/layout/jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* eslint-disable no-undef */
jest.mock('react-i18next', () => ({
...jest.requireActual('react-i18next'),
useTranslation: () => ({ t: key => key, i18n: { languages: ['en'] } }),
}));
6 changes: 6 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
"sharedGlobals": [{ "runtime": "node --version" }, "{workspaceRoot}/*.env"]
},
"plugins": [
{
"plugin": "@nx/jest/plugin",
"options": {
"targetName": "test"
}
}
],
"generators": {
},
Expand Down

0 comments on commit c3fadb5

Please sign in to comment.