Added hotkeys + updated dependencies & webpack5 + humanetech badge (#15)

* Added language & theme switch hotkeys

* Hotkeys testing

* Language switch when equal

* Shortcut keys changed

* Dependencies updated & upgraded to webpack5

* Added HumaneTech badge

* Disabled FLoC
This commit is contained in:
David
2021-04-30 23:11:26 +02:00
committed by GitHub
parent a80c177440
commit cf0b310918
11 changed files with 1511 additions and 1215 deletions

View File

@@ -32,6 +32,24 @@ it("changes all fields", () => {
expect(res).toStrictEqual(state);
});
it("switches target on source change", () => {
const state = {
...initialState,
source: "es",
target: "ca"
};
const res = langReducer(state, {
type: Actions.SET_FIELD,
payload: {
key: "source",
value: state.target
}
});
expect(res.source).toStrictEqual(state.target);
expect(res.target).toStrictEqual(state.source);
});
it("switches the languages & the translations", () => {
const state = {
...initialState,