Skip to content

This library mocks the Commercetools messages to ease testing of your typescript codebases.

Notifications You must be signed in to change notification settings

composable-software/commercetools-messages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

60bd126 · Oct 26, 2022

History

50 Commits
Feb 20, 2022
Feb 19, 2022
Oct 26, 2022
Oct 26, 2022
Feb 19, 2022
Feb 19, 2022
Feb 20, 2022
Feb 20, 2022
Oct 26, 2022
Oct 26, 2022
Feb 20, 2022
Oct 22, 2022

Repository files navigation

Commercetools Messages

This library mocks the Commercetools messages to ease testing of your typescript codebases.

Supported resources

  • order
  • customer
  • product
  • category

Installation

For npm:

  • npm i @peepoglad/commercetools-messages --save-dev

For yarn:

  • yarn add @peepoglad/commercetools-messages --dev

Usage

To build payload, import the package into your file:

import { ProductAddedToCategoryMessage } from '@commercetools/platform-sdk'
import { ProductAddedToCategory } from '@peepoglad/commercetools-messages'

const payload: ProductAddedToCategoryMessage = ProductAddedToCategory()
  .id('gigaId')
  .build()

...

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-giga-feature
  3. Commit your changes: git commit -am 'Add some giga feature'
  4. Push to the branch: git push origin my-new-giga-feature
  5. Submit a pull request :D