-
Notifications
You must be signed in to change notification settings - Fork 12
/
ark-qrcode.spec.ts
41 lines (33 loc) · 1017 Bytes
/
ark-qrcode.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { TestWindow } from '@stencil/core/testing';
import { ArkQRCode } from './ark-qrcode';
describe('ark-qrcode', () => {
it('should build', () => {
expect(new ArkQRCode()).toBeTruthy();
});
describe('rendering', () => {
let window;
let element;
beforeEach(async () => {
window = new TestWindow();
element = await window.load({
components: [ArkQRCode],
html: '<ark-qrcode></ark-qrcode>'
});
});
it ('should work without params', async () => {
await window.flush();
});
it ('should work only with address', async () => {
element.address = 'DLteVA8j6B5DLpFp2Z3XSw1ENGXMjtFQsf';
await window.flush();
})
it ('should work vendor-field without special characters', async () => {
element.vendorField = 'Hello';
await window.flush();
});
it('should work vendor-field with special characters', async () => {
element.vendorField = 'Hello%20Ark!';
await window.flush();
});
})
})