Skip to content

Commit 7565508

Browse files
author
David
committed
fix: fixing test and linting issues after changing ArrayBuffer by Uint8Array
1 parent 96815ae commit 7565508

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

example/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { Text, View, StyleSheet, TouchableOpacity } from 'react-native'
33
import { getRandomBytes, getRandomInt, generateUUID } from 'react-native-csrng'
44

55
export default function App() {
6-
const [randomBytes, setRandomBytes] = useState<ArrayBuffer>(
7-
new ArrayBuffer(0)
6+
const [randomBytes, setRandomBytes] = useState<Uint8Array>(
7+
new Uint8Array(0)
88
)
99
const [randomInt, setRandomInt] = useState<number>(0)
1010
const [uuid, setUuid] = useState<string>('')

src/__tests__/index.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('index.tsx', () => {
1616
it('should return an ArrayBuffer of the specified length from getRandomBytes', () => {
1717
const length = 16
1818
const result = getRandomBytes(length)
19-
expect(result).toBeInstanceOf(ArrayBuffer)
19+
expect(result).toBeInstanceOf(Uint8Array)
2020
expect(result.byteLength).toBe(length)
2121
})
2222

0 commit comments

Comments
 (0)