generated from Seekra/repository-template
Compare commits
6
Commits
59ffa4b043
...
5a9191e69b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a9191e69b
|
||
|
|
32c972d043
|
||
|
|
68a827a113
|
||
|
|
c047060b7c
|
||
|
|
cd3a288935
|
||
|
|
7ee9c45339
|
@@ -1,3 +1,17 @@
|
|||||||
#!/usr/bin/env pwsh
|
#!/usr/bin/env pwsh
|
||||||
|
|
||||||
|
# Copyright 2026 Seekra
|
||||||
|
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
git config --local commit.template .gitmessage
|
git config --local commit.template .gitmessage
|
||||||
@@ -1,3 +1,17 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2026 Seekra
|
||||||
|
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
git config --local commit.template .gitmessage
|
git config --local commit.template .gitmessage
|
||||||
@@ -39,7 +39,7 @@ vi.mock('@/features/icons/components/Icon.vue', () => ({
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
describe('LanguageSwitchButton.vue', () => {
|
describe('LanguageSwitchButton', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
vi.clearAllMocks();
|
vi.clearAllMocks();
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ limitations under the License.
|
|||||||
import { describe, test, expect } from 'vitest';
|
import { describe, test, expect } from 'vitest';
|
||||||
import { validateSettingsConfig, validateEntry, validateSelectionOptions, assertType, assertString } from '../settingsValidator';
|
import { validateSettingsConfig, validateEntry, validateSelectionOptions, assertType, assertString } from '../settingsValidator';
|
||||||
|
|
||||||
|
describe('settingsValidator', () => {
|
||||||
describe('validateSettingsConfig', () => {
|
describe('validateSettingsConfig', () => {
|
||||||
test.for([
|
test.for([
|
||||||
{ raw: false, expected: false },
|
{ raw: false, expected: false },
|
||||||
@@ -756,3 +757,4 @@ describe('assertString', () => {
|
|||||||
expect(() => assertString(value)).throws(Error);
|
expect(() => assertString(value)).throws(Error);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
@@ -14,9 +14,10 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { expect, test } from 'vitest';
|
import { describe, expect, test } from 'vitest';
|
||||||
import { ensureUnit } from '../cssDimensions';
|
import { ensureUnit } from '../cssDimensions';
|
||||||
|
|
||||||
|
describe('cssDimensions', () => {
|
||||||
test.for([
|
test.for([
|
||||||
{ dimension: null, expected: '0px' },
|
{ dimension: null, expected: '0px' },
|
||||||
{ dimension: undefined, expected: '0px' },
|
{ dimension: undefined, expected: '0px' },
|
||||||
@@ -120,3 +121,4 @@ test.for([
|
|||||||
])('ensureUnit returns $expected with input $dimension', ({ dimension, expected }) => {
|
])('ensureUnit returns $expected with input $dimension', ({ dimension, expected }) => {
|
||||||
expect(ensureUnit(dimension)).toBe(expected);
|
expect(ensureUnit(dimension)).toBe(expected);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
@@ -14,10 +14,11 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { expect, test } from 'vitest';
|
import { describe, expect, test } from 'vitest';
|
||||||
import getCurrentLanguage from '../currentLanguage';
|
import getCurrentLanguage from '../currentLanguage';
|
||||||
|
|
||||||
const locales = [
|
describe('currentLanguage', () => {
|
||||||
|
test.for([
|
||||||
{ navigatorLanguage: 'en', localStorageLanguage: null, expected: 'en'},
|
{ navigatorLanguage: 'en', localStorageLanguage: null, expected: 'en'},
|
||||||
{ navigatorLanguage: 'de', localStorageLanguage: null, expected: 'de'},
|
{ navigatorLanguage: 'de', localStorageLanguage: null, expected: 'de'},
|
||||||
{ navigatorLanguage: 'fr', localStorageLanguage: null, expected: 'fr'},
|
{ navigatorLanguage: 'fr', localStorageLanguage: null, expected: 'fr'},
|
||||||
@@ -45,9 +46,7 @@ const locales = [
|
|||||||
{ navigatorLanguage: 'de-de', localStorageLanguage: 'en', expected: 'en'},
|
{ navigatorLanguage: 'de-de', localStorageLanguage: 'en', expected: 'en'},
|
||||||
{ navigatorLanguage: 'zh-Hans-CN', localStorageLanguage: 'fr', expected: 'fr'},
|
{ navigatorLanguage: 'zh-Hans-CN', localStorageLanguage: 'fr', expected: 'fr'},
|
||||||
{ navigatorLanguage: 'en-US-u-ca-gregory', localStorageLanguage: 'zh', expected: 'zh'}
|
{ navigatorLanguage: 'en-US-u-ca-gregory', localStorageLanguage: 'zh', expected: 'zh'}
|
||||||
];
|
])('returns the language $expected (navigator: $navigatorLanguage; local storage: $localStorageLanguage)', ({ navigatorLanguage, localStorageLanguage, expected }) => {
|
||||||
|
|
||||||
test.for(locales)('returns the language $expected (navigator: $navigatorLanguage; local storage: $localStorageLanguage)', ({ navigatorLanguage, localStorageLanguage, expected }) => {
|
|
||||||
Object.defineProperty(navigator, 'language', {
|
Object.defineProperty(navigator, 'language', {
|
||||||
value: navigatorLanguage,
|
value: navigatorLanguage,
|
||||||
configurable: true
|
configurable: true
|
||||||
@@ -59,3 +58,4 @@ test.for(locales)('returns the language $expected (navigator: $navigatorLanguage
|
|||||||
|
|
||||||
expect(getCurrentLanguage()).toBe(expected);
|
expect(getCurrentLanguage()).toBe(expected);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user