Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
asashay committed May 26, 2020
1 parent d42394f commit 883ac2d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-video-progress",
"version": "0.3.1",
"version": "1.0.0",
"description": "React component to show video progress at frame borders",
"author": "asashay",
"license": "MIT",
Expand Down
20 changes: 10 additions & 10 deletions src/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { render, fireEvent } from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import { VideoProgress, START, TYPE } from './.'
import { VideoProgress, START, LINE_TYPE } from './.'
import { getLengthes, getBarsPositions } from './helpers'

describe('VideoProgress', () => {
Expand Down Expand Up @@ -64,7 +64,7 @@ describe('Test getLengthes function', () => {
const width = 300
const height = 200
const progressStart = START.BottomLeft
const type = TYPE.OneLine
const type = LINE_TYPE.OneLine
const { top, right, bottom, left } = getLengthes({
path,
width,
Expand Down Expand Up @@ -225,7 +225,7 @@ describe('Test getBarsPositions function', () => {
BottomLeft is of OneLine type`, () => {
const { topBar, rightBar, bottomBar, leftBar } = getBarsPositions(
START.BottomLeft,
TYPE.OneLine
LINE_TYPE.OneLine
)
expect(topBar).toEqual({ left: 0, top: 0 })
expect(rightBar).toEqual({ right: 0, top: 0 })
Expand All @@ -238,7 +238,7 @@ describe('Test getBarsPositions function', () => {
BottomLeft is of TwoLines type`, () => {
const { topBar, rightBar, bottomBar, leftBar } = getBarsPositions(
START.BottomLeft,
TYPE.TwoLines
LINE_TYPE.TwoLines
)
expect(topBar).toEqual({ left: 0, top: 0 })
expect(rightBar).toEqual({ right: 0, bottom: 0 })
Expand All @@ -251,7 +251,7 @@ describe('Test getBarsPositions function', () => {
TopLeft is of TwoLines type`, () => {
const { topBar, rightBar, bottomBar, leftBar } = getBarsPositions(
START.TopLeft,
TYPE.TwoLines
LINE_TYPE.TwoLines
)
expect(topBar).toEqual({ left: 0, top: 0 })
expect(rightBar).toEqual({ right: 0, top: 0 })
Expand All @@ -264,7 +264,7 @@ describe('Test getBarsPositions function', () => {
TopRight is of TwoLines type`, () => {
const { topBar, rightBar, bottomBar, leftBar } = getBarsPositions(
START.TopRight,
TYPE.TwoLines
LINE_TYPE.TwoLines
)
expect(topBar).toEqual({ right: 0, top: 0 })
expect(rightBar).toEqual({ right: 0, top: 0 })
Expand All @@ -277,7 +277,7 @@ describe('Test getBarsPositions function', () => {
BottomRight is of TwoLines type`, () => {
const { topBar, rightBar, bottomBar, leftBar } = getBarsPositions(
START.BottomRight,
TYPE.TwoLines
LINE_TYPE.TwoLines
)
expect(topBar).toEqual({ right: 0, top: 0 })
expect(rightBar).toEqual({ right: 0, bottom: 0 })
Expand All @@ -294,8 +294,8 @@ describe('Test types', () => {
expect(START.BottomRight).toEqual('BottomRight')
})

it('checks TYPE types', () => {
expect(TYPE.OneLine).toEqual('OneLine')
expect(TYPE.TwoLines).toEqual('TwoLines')
it('checks LINE_TYPE types', () => {
expect(LINE_TYPE.OneLine).toEqual('OneLine')
expect(LINE_TYPE.TwoLines).toEqual('TwoLines')
})
})

0 comments on commit 883ac2d

Please sign in to comment.