This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { articleTestFactory } from '~/domain/article'; | |
import { shoppingCartTestFactory, itemTestFactory } from '~/domain/shoppingCart'; | |
import { InMemoryShoppingCartRepository } from '~/infrastructure/InMemoryShoppingCartRepository'; | |
import { InMemoryArticleRepository } from '~/infrastructure/InMemoryArticleRepository'; | |
describe('addArticleToCart', () => { | |
it('should update, persist and return the cart with a new article', async () => { | |
// Arrange | |
const shoppingCartRepository = new InMemoryShoppingCartRepository(); | |
const shoppingCart = shoppingCartTestFactory({items: []}) |
OlderNewer