Added coverage
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
"android": "react-native-scripts android",
|
||||
"ios": "react-native-scripts ios",
|
||||
"test": "jest",
|
||||
"coverage": "jest --coverage --no-cache",
|
||||
"flow": "flow",
|
||||
"addTypes": "flow-typed install"
|
||||
},
|
||||
|
||||
@@ -8,20 +8,19 @@ import { RegionsTable } from "./regionsTable.component";
|
||||
|
||||
Enzyme.configure({ adapter: new Adapter() });
|
||||
|
||||
const fakeDeviceData = {
|
||||
isTablet: false,
|
||||
isPortrait: true,
|
||||
height: 1000,
|
||||
width: 720,
|
||||
scale: 1,
|
||||
fontScale: 1
|
||||
};
|
||||
|
||||
describe("RegionsTable", () => {
|
||||
it("renders correctly an empty list", () => {
|
||||
const wrapper = Enzyme.shallow(
|
||||
<RegionsTable
|
||||
deviceData={{
|
||||
isTablet: false,
|
||||
isPortrait: true,
|
||||
height: 1000,
|
||||
width: 720,
|
||||
scale: 1,
|
||||
fontScale: 1
|
||||
}}
|
||||
list={[]}
|
||||
/>
|
||||
<RegionsTable deviceData={fakeDeviceData} list={[]} />
|
||||
);
|
||||
expect(wrapper.contains("No regions."));
|
||||
});
|
||||
@@ -29,14 +28,7 @@ describe("RegionsTable", () => {
|
||||
it("renders correctly a list", () => {
|
||||
const wrapper = Enzyme.shallow(
|
||||
<RegionsTable
|
||||
deviceData={{
|
||||
isTablet: false,
|
||||
isPortrait: true,
|
||||
height: 1000,
|
||||
width: 720,
|
||||
scale: 1,
|
||||
fontScale: 1
|
||||
}}
|
||||
deviceData={fakeDeviceData}
|
||||
list={[
|
||||
{
|
||||
countryCode: "UY",
|
||||
|
||||
Reference in New Issue
Block a user