Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JStruk committed Apr 10, 2024
1 parent 321d39b commit 1751891
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/utilities/JSONToPHPArray.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, it, expect } from 'vitest'
import { describe, expect, it } from 'vitest'
import { JSONToPHPArray } from '@/utilities/JSONToPHPArray'

describe('JSONToPHPArray', () => {
Expand All @@ -11,14 +11,14 @@ describe('JSONToPHPArray', () => {

it('returns an php array from json object', function () {
const json = '{"foo":"bar"}'
const result = '["foo"=>"bar"]'
const result = '["foo" => "bar"]'

expect(JSONToPHPArray(json)).toEqual(result)
})

it('should convert nested php array to json object', function () {
const json = '{"baz":{"foo":"bar"}}'
const result = '["baz"=>["foo"=>"bar"]]'
const result = '["baz" => ["foo" => "bar"]]'

expect(JSONToPHPArray(json)).toEqual(result)
})
Expand Down

0 comments on commit 1751891

Please sign in to comment.