Skip to content

Commit 8ae6c51

Browse files
committed
style(native): fix linting issues
1 parent 6421544 commit 8ae6c51

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

packages/native/src/lib/ElementAssertion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Assertion, AssertionError } from "@assertive-ts/core";
22
import { get } from "dot-prop-immutable";
33
import { ReactTestInstance } from "react-test-renderer";
44

5-
import { instanceToString, isEmpty, getFlattenedStyle, styleToString } from "./helpers/helpers";
5+
import { instanceToString, isEmpty, getFlattenedStyle, styleToString } from "./helpers/helpers";
66
import { AssertiveStyle } from "./helpers/types";
77

88
export class ElementAssertion extends Assertion<ReactTestInstance> {

packages/native/src/lib/helpers/helpers.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { StyleSheet } from "react-native";
22
import { ReactTestInstance } from "react-test-renderer";
3-
import { AssertiveStyle, StyleObject } from "./types";
43

4+
import { AssertiveStyle, StyleObject } from "./types";
55

66
/**
77
* Checks if a value is empty.
@@ -35,13 +35,12 @@ export function instanceToString(instance: ReactTestInstance | null): string {
3535
return `<${instance.type.toString()} ... />`;
3636
}
3737

38-
3938
export function getFlattenedStyle(style: AssertiveStyle): StyleObject {
4039
const flattenedStyle = StyleSheet.flatten(style);
4140
return flattenedStyle ? (flattenedStyle as StyleObject) : {};
4241
}
4342

4443
export function styleToString(flattenedStyle: StyleObject): string {
4544
const styleEntries = Object.entries(flattenedStyle);
46-
return styleEntries.map(([key, value]) => `\t- ${key}: ${value};`).join("\n");
45+
return styleEntries.map(([key, value]) => `\t- ${key}: ${String(value)};`).join("\n");
4746
}

0 commit comments

Comments
 (0)