fix unit tests. add conversation model and add unit tests to it.

This commit is contained in:
Jordan Hewitt
2025-01-25 09:11:09 -08:00
parent 0c9daf8e4a
commit 82d9c9c523
21 changed files with 7127 additions and 4712 deletions

View File

@ -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,