Lines Matching refs:t

8 export function test(t) {  argument
17 t.describe(name, () => {
18 t.describe('store -> fetch -> delete -> fetch -> err:', () => {
19 t.it('Sets a value with a key', async () => {
22 t.expect(result).toBe(undefined);
24 t.fail(e);
27 t.it('Fetch the value stored with the key', async () => {
30 t.expect(fetchedValue).toBe(value);
32 t.fail(e);
35 t.it('Delete the value associated with the key', async () => {
38 t.expect(result).toBe(undefined);
40 t.fail(e);
43 t.it('Fetch the previously deleted key, expect null', async () => {
45 t.expect(fetchedValue).toBe(null);
48 t.describe('store -> fetch -> delete -> fetch -> err with Options:', () => {
49 t.it('Sets a value with a key and keychainService', async () => {
53 t.expect(result).toBe(undefined);
55 t.it('Fetch the value stored with the key and keychainService', async () => {
59 t.expect(fetchedValue).toBe(value);
61 t.it('Delete the value associated with the key', async () => {
65 t.expect(result).toBe(undefined);
67 t.it('Fetch the previously deleted key, expect null', async () => {
71 t.expect(fetchedValue).toBe(null);
74 t.describe('store with empty key -> err:', () => {
75 t.it('Sets a value with an empty key, expect error', async () => {
78 t.fail(result);
80 t.expect(e).toBeTruthy();
84 t.describe('store with empty Value -> err:', () => {
85 t.it('Sets an empty value with a key, expect error', async () => {
88 t.fail(result);
90 t.expect(e).toBeTruthy();
94 t.describe('store value with keychainServiceA, fetch with keychainServiceB -> err:', () => {
95 t.it('Sets a value with keychainServiceA', async () => {
97 t.expect(result).toBe(undefined);
100 t.it('Fetch value with keychainServiceB, expect null', async () => {
102 t.expect(result).toBe(null);
105 t.it('Fetch value with keychainServiceB, expect decoding error', async () => {
108 t.fail(result);
110 t.expect(e).toBeTruthy();
111 t.expect(e.message).toMatch(`Could not encrypt/decrypt the value for SecureStore`);
116 t.describe('store long value, fetch long value -> Success:', () => {
117 t.it('Set long value', async () => {
119 t.expect(result).toBe(undefined);
122 t.it('Fetch long value', async () => {
124 t.expect(result).toBe(longValue);