fix: the tests use the new typing from create methods

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-09-25 11:55:35 +02:00 committed by David Mehren
parent 8cda5f99fb
commit b1d4696895
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
11 changed files with 77 additions and 65 deletions

View file

@ -27,10 +27,10 @@ describe('getPrimaryAlias', () => {
let note: Note;
beforeEach(() => {
const user = User.create('hardcoded', 'Testy') as User;
note = Note.create(user, alias);
note = Note.create(user, alias) as Note;
});
it('finds correct primary alias', () => {
note.aliases.push(Alias.create('annother', false));
note.aliases.push(Alias.create('annother', note, false) as Alias);
expect(getPrimaryAlias(note)).toEqual(alias);
});
it('returns undefined if there is no alias', () => {