Skip to content

Commit

Permalink
(PC-33482) feat(NC): use it instead test in priceSchema tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeneston-pass committed Dec 26, 2024
1 parent ed7a1e0 commit a418427
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('priceSchema', () => {
const initialCredit = 100
const currency = Currency.EURO

test('should validate correctly when minPrice and maxPrice are within range', async () => {
it('should validate correctly when minPrice and maxPrice are within range', async () => {
const validData = {
minPrice: '10,00',
maxPrice: '50,00',
Expand All @@ -19,7 +19,7 @@ describe('priceSchema', () => {
await expect(priceSchema({ initialCredit, currency }).isValid(validData)).resolves.toBe(true)
})

test('should invalidate when maxPrice exceeds initialCredit', async () => {
it('should invalidate when maxPrice exceeds initialCredit', async () => {
const invalidData = {
minPrice: '10,00',
maxPrice: '150,00',
Expand All @@ -30,7 +30,7 @@ describe('priceSchema', () => {
await expect(priceSchema({ initialCredit, currency }).isValid(invalidData)).resolves.toBe(false)
})

test('should invalidate when minPrice is greater than maxPrice', async () => {
it('should invalidate when minPrice is greater than maxPrice', async () => {
const invalidData = {
minPrice: '60,00',
maxPrice: '50,00',
Expand All @@ -41,7 +41,7 @@ describe('priceSchema', () => {
await expect(priceSchema({ initialCredit, currency }).isValid(invalidData)).resolves.toBe(false)
})

test('should validate when maxPrice is empty and minPrice is within range', async () => {
it('should validate when maxPrice is empty and minPrice is within range', async () => {
const validData = {
minPrice: '10,00',
maxPrice: '',
Expand All @@ -52,7 +52,7 @@ describe('priceSchema', () => {
await expect(priceSchema({ initialCredit, currency }).isValid(validData)).resolves.toBe(true)
})

test('should invalidate when minPrice has incorrect format', async () => {
it('should invalidate when minPrice has incorrect format', async () => {
const invalidData = {
minPrice: '10,000',
maxPrice: '50,00',
Expand All @@ -63,7 +63,7 @@ describe('priceSchema', () => {
await expect(priceSchema({ initialCredit, currency }).isValid(invalidData)).resolves.toBe(false)
})

test('should invalidate when maxPrice has incorrect format', async () => {
it('should invalidate when maxPrice has incorrect format', async () => {
const invalidData = {
minPrice: '10,00',
maxPrice: '50.000',
Expand Down

0 comments on commit a418427

Please sign in to comment.