Skip to content

Commit 9e3eb2f

Browse files
committed
Resolved lint errors
1 parent 26ad584 commit 9e3eb2f

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

test/flutterwave.spec.ts

+13-22
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,25 @@
1-
21
/**
32
* @jest-environment jsdom
43
*/
5-
6-
7-
import React, {useState} from 'react';
84
import useFWScript from '../src/script';
95
import useFW from '../src/useFW';
10-
import { renderHook } from "@testing-library/react";
6+
import { renderHook } from '@testing-library/react';
117

12-
import '@testing-library/jest-dom'
8+
import '@testing-library/jest-dom';
139

1410

1511
test('FlutterwaveModule should create', () => {
16-
const {result} = renderHook(() => useFWScript())
17-
12+
const {result} = renderHook(() => useFWScript({}));
13+
1814
expect(
1915
result.current[0]
2016
).not.toBeTruthy();
21-
22-
})
17+
});
2318

24-
test('should load Flutterwave Inline script and have FlutterwaveCheckout function', () => {
19+
test('Should load Flutterwave Inline script and have FlutterwaveCheckout function', () => {
2520
const config = {
26-
public_key: "FLWPUBK-**************************-X",
27-
tx_ref: "text_ref1234",
21+
public_key: 'FLWPUBK-**************************-X',
22+
tx_ref: 'text_ref1234',
2823
amount: 10,
2924
currency: 'NGN',
3025
payment_options: 'card,mobilemoney,ussd',
@@ -33,21 +28,17 @@ test('should load Flutterwave Inline script and have FlutterwaveCheckout functio
3328
phone_number: '08102909304',
3429
name: 'test user',
3530
},
36-
3731
customizations: {
3832
title: 'My store',
3933
description: 'Payment for items in cart',
4034
logo: 'https://assets.piedpiper.com/logo.png',
4135
},
42-
43-
4436
};
4537

46-
const {result} = renderHook(() => useFW(config))
38+
const {result} = renderHook(() => useFW(config));
4739

48-
expect(
49-
document.querySelector(`script[src="https://checkout.flutterwave.com/v3.js"]`)
50-
).not.toBeNull();
51-
52-
})
40+
expect(
41+
document.querySelector('script[src="https://checkout.flutterwave.com/v3.js"]')
42+
).not.toBeNull();
43+
});
5344

0 commit comments

Comments
 (0)