Skip to content

Commit

Permalink
Update test-vectors.spec.ts (#154)
Browse files Browse the repository at this point in the history
* Update test-vectors.spec.ts

To get the checkmarks to work and find the correct tests on the test runner, test vectors need to be in this format:

TbdexTestVectors <testfolder (Protocol)> <testjson eg parse_close)

so it will find 
TbdexTestVecotrsProtocol parse_close and give it a checkmark

* Update packages/protocol/tests/test-vectors.spec.ts
  • Loading branch information
nitro-neal authored Jan 23, 2024
1 parent a41dec2 commit a988023
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/protocol/tests/test-vectors.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,33 @@ import ParseOrderStatus from '../../../tbdex/hosted/test-vectors/protocol/vector
import ParseQuote from '../../../tbdex/hosted/test-vectors/protocol/vectors/parse-quote.json' assert { type: 'json' }
import ParseRfq from '../../../tbdex/hosted/test-vectors/protocol/vectors/parse-rfq.json' assert { type: 'json' }

describe('Test vectors: parse and serialize', () => {
it('parse-close.json', async () => {
describe('TbdexTestVectorsProtocol', () => {
it('parse_close', async () => {
const close = await Close.parse(ParseClose.input)
expect(close.toJSON()).to.deep.eq(ParseClose.output)
})

it('parse-offering.json', async() => {
it('parse_offering', async() => {
const offering = await Offering.parse(ParseOffering.input)
expect(offering.toJSON()).to.deep.eq(ParseOffering.output)
})

it('parse-order.json', async () => {
it('parse_order', async () => {
const order = await Order.parse(ParseOrder.input)
expect(order.toJSON()).to.deep.eq(ParseOrder.output)
})

it('parse-orderstatus.json', async () => {
it('parse_orderstatus', async () => {
const orderstatus = await OrderStatus.parse(ParseOrderStatus.input)
expect(orderstatus.toJSON()).to.deep.eq(ParseOrderStatus.output)
})

it('parse-quote.json', async () => {
it('parse_quote', async () => {
const quote = await Quote.parse(ParseQuote.input)
expect(quote.toJSON()).to.deep.eq(ParseQuote.output)
})

it('parse-rfq.json', async () => {
it('parse_rfq', async () => {
const rfq = await Rfq.parse(ParseRfq.input)
expect(rfq.toJSON()).to.deep.eq(ParseRfq.output)
})
Expand Down

0 comments on commit a988023

Please sign in to comment.