fix unit tests. add conversation model and add unit tests to it.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { Cache } from "react-native-cache";
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import { LIBRETRANSLATE_BASE_URL } from "@/constants/api";
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
|
||||
type language_t = string;
|
||||
|
||||
@ -35,7 +35,7 @@ export class Translator {
|
||||
});
|
||||
const data = await res.json();
|
||||
return Object.fromEntries(
|
||||
Object.values(data).map((obj : language_matrix_entry) => {
|
||||
Object.values(data as language_matrix_entry []).map((obj : language_matrix_entry) => {
|
||||
return [
|
||||
obj["code"],
|
||||
obj,
|
||||
|
Reference in New Issue
Block a user