Skip to content

Commit

Permalink
chore(packages/sui-test-contract): update beta
Browse files Browse the repository at this point in the history
  • Loading branch information
kikoruiz committed Jun 26, 2023
1 parent d976ff6 commit 36a0ad9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/sui-test-contract/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@s-ui/test-contract",
"version": "2.12.0",
"version": "2.13.0-beta.1",
"description": "Useful tooling for defining contract tests (based on Pact) that will generate contract documents.",
"license": "MIT",
"main": "src/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/sui-test-contract/src/setup/utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {stringify} from 'qs'

import {writeData2File} from '@pactflow/pact-msw-adapter/dist/utils/utils.js'
import {createWriter} from '@pactflow/pact-msw-adapter/dist/utils/utils.js'

const flatEntries = (input, prefix = '') =>
Object.entries(input).flatMap(([key, value]) => {
Expand Down Expand Up @@ -61,7 +61,7 @@ export const writerFactory = providers => (path, data) => {
})

console.log(`Writing the Pact file "${path}"`) // eslint-disable-line
writeData2File(path, data)
createWriter()(path, data)
}

export const mapProviders = providers =>
Expand Down
4 changes: 3 additions & 1 deletion packages/sui-test-contract/test/server/setupSpec.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import {expect} from 'chai'

import {FetcherFactory} from '@s-ui/domain'
import {rest} from '@s-ui/mock'
import mock from '@s-ui/mock'

import {setupContractTests} from '../../src/index.js'
import {getContractFileData, removeContractFiles} from '../utils.js'

const {rest} = mock

const fetcher = FetcherFactory.httpFetcher({config: {}})
const consumer = 'test-consumer'
const fujiAppleResponse = {color: 'red', type: 'Fuji'}
Expand Down

0 comments on commit 36a0ad9

Please sign in to comment.