ci: improve restore test

This commit is contained in:
thecodrr
2020-03-21 11:40:03 +05:00
parent 99acc7fd38
commit 5d8618f306
3 changed files with 3 additions and 2 deletions

View File

@@ -31,6 +31,8 @@ test("restore a deleted note", () =>
expect(db.trash.all.length).toBe(0); expect(db.trash.all.length).toBe(0);
let note = db.notes.note(id); let note = db.notes.note(id);
expect(note).toBeDefined(); expect(note).toBeDefined();
expect(await note.text()).toBe(TEST_NOTE.content.text);
expect(await note.delta()).toStrictEqual(TEST_NOTE.content.delta);
expect( expect(
db.notebooks db.notebooks
.notebook(nbId) .notebook(nbId)

View File

@@ -18,7 +18,6 @@ export default class Lookup {
async notes(array, query) { async notes(array, query) {
const textIds = array.map(v => v.content.text); const textIds = array.map(v => v.content.text);
const textArray = await this._db.text.multi(textIds); const textArray = await this._db.text.multi(textIds);
console.log(textArray, textIds);
const filteredText = tfun.filter(text => fuzzysearch(query, text.data))( const filteredText = tfun.filter(text => fuzzysearch(query, text.data))(
textArray textArray
); );

View File

@@ -1,4 +1,4 @@
export const HOST = "http://192.168.10.11:4000/"; export const HOST = "http://localhost:8000/";
export const HEADERS = { export const HEADERS = {
agent: "nn/1.0.0", agent: "nn/1.0.0",
"Content-Type": "application/json" "Content-Type": "application/json"