All Downloads are FREE. Search and download functionalities are using the official Maven repository.

impl.actions.link.link.test.js Maven / Gradle / Ivy

There is a newer version: 7.28.3
Show newest version
import sinon from 'sinon'

import link from './link'

describe('link', () => {
    it('должен вызывать событие перхода внутри приложения', () => {
        const dispatch = sinon.spy()

        link({
            target: 'application',
            dispatch,
            path: '/test/:id',
            pathMapping: {
                id: {
                    link: 'test.id',
                },
            },
            state: {
                test: {
                    id: 123,
                },
            },
        })

        expect(dispatch.calledOnce).toBeTruthy()
        expect(dispatch.getCall(0).args[0].payload.args[0]).toBe('/test/123')
    })
})




© 2015 - 2025 Weber Informatics LLC | Privacy Policy