Skip to content

Commit

Permalink
adjusts
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Sep 13, 2023
1 parent e5b0514 commit 9f3b166
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
1 change: 1 addition & 0 deletions generators/vue/resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"postcss-import": "15.1.0",
"postcss-url": "10.1.3",
"rimraf": "5.0.1",
"flush-promises": "1.0.2",
"rollup-plugin-copy": "3.5.0",
"sass": "1.66.1",
"sinon": "15.2.0",
Expand Down
1 change: 1 addition & 0 deletions generators/vue/templates/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"<%= blueprint.name %>": "<%= blueprint.version %>",
<%_ }); _%>
<%_ } _%>
"flush-promises": "<%= nodeDependencies['flush-promises'] %>",
"happy-dom": "<%= nodeDependencies['happy-dom'] %>",
"numeral": "<%= nodeDependencies['numeral'] %>",
"postcss-import": "<%= nodeDependencies['postcss-import'] %>",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { vitest } from 'vitest';
import { ref } from 'vue';
import { shallowMount } from '@vue/test-utils';
import flushPromises from 'flush-promises';
import EntitiesMenu from './entities-menu.vue';

type EntitiesMenuComponentType = InstanceType<typeof EntitiesMenu>;

const currentLanguage = 'en';
vitest.mock('../../i18n/en/en.js', () => ({ default: {} }));

describe('EntitiesMenu', () => {
let translationService;

Expand All @@ -13,20 +17,21 @@ describe('EntitiesMenu', () => {
});

describe('using microfrontendI18n', () => {
beforeEach(() => {
beforeEach(async () => {
shallowMount(EntitiesMenu, {
global: {
stubs: {
'b-dropdown-item': true,
'font-awesome-icon': true,
},
},
provide: {
translationService,
microfrontendI18n: true,
currentLanguage: ref('<%- nativeLanguage %>'),
currentLanguage: ref(currentLanguage),
},
},
});
await flushPromises();
});

it('should load translations', () => {
Expand All @@ -35,20 +40,21 @@ describe('EntitiesMenu', () => {
});

describe('not using microfrontendI18n', () => {
beforeEach(() => {
beforeEach(async () => {
shallowMount(EntitiesMenu, {
global: {
stubs: {
'b-dropdown-item': true,
'font-awesome-icon': true,
},
},
provide: {
translationService,
microfrontendI18n: false,
currentLanguage: ref('<%- nativeLanguage %>'),
currentLanguage: ref(currentLanguage),
},
},
});
await flushPromises();
});

it('should not load translations', () => {
Expand Down
6 changes: 3 additions & 3 deletions generators/vue/templates/tsconfig.app.json.ejs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"include": ["<%= clientSrcDir %>/**/*", "<%= clientSrcDir %>app/**/*.vue"],
"exclude": ["<%= clientSrcDir %>app/**/*.spec.ts"],
"compilerOptions": {
"composite": true,
"baseUrl": "<%= clientSrcDir %>app",
"outDir": "<%= temporaryDir %>out-tsc/dist",
"paths": {
"@/*": ["./src/*"]
"@/*": ["./<%= clientSrcDir %>app/*"]
}
}
}
5 changes: 1 addition & 4 deletions generators/vue/templates/tsconfig.node.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
"extends": "@tsconfig/node18/tsconfig.json",
"include": [
"vite.config.*",
"vitest.config.*",
"cypress.config.*",
"nightwatch.conf.*",
"playwright.config.*"
"vitest.config.*"
],
"compilerOptions": {
"composite": true,
Expand Down

0 comments on commit 9f3b166

Please sign in to comment.