Skip to content
#

mocking-framework

Here are 93 public repositories matching this topic...

msw
Smankusors
Smankusors commented Nov 7, 2021

Describe the bug

I received this error whenever there's code error on the handler code.

Environment

This unit testing running on Node environment

  • msw: 0.35.0
  • nodejs: 16.6.0
  • npm: 7.24.1

To Reproduce

Take a look at the example of the handler code below:

import { rest } from 'msw'

export const handlers = [
  rest.post('/login', (req, res, ctx) => {
    
mockk
florianschmidt1994
florianschmidt1994 commented Apr 14, 2017

Hey Guys,
I see an IllegalStateException when running one particular test.

What steps will reproduce the problem?
The following code fails each time it is run

Testcase:

package backend.model.posting

import backend.controller.exceptions.ConflictException
import backend.model.location.Location
import backend.model.user.UserAccount
import org.junit.Before
import org.
cloverrose
cloverrose commented Mar 27, 2020

This Add method has trailing comma in parameters part.

type Calculator interface {
	Add(a int,
		b int,
	) int
}

It causes error like this.

10:30: expected statement, found ')' (and 1 more errors)
Usage:
1. Copy the interface you want to mock
2. Run 'mokku'
3. Paste the mocked implementation that has been written to your clipboard

Improve this page

Add a description, image, and links to the mocking-framework topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the mocking-framework topic, visit your repo's landing page and select "manage topics."

Learn more