Skip to content

支持 Mock.mock( rurl, [rtype], function( options ) ) 的回调函数返回 Promise 对象#236

Open
luozhihua wants to merge 2 commits intonuysoft:refactoringfrom
luozhihua:refactoring
Open

支持 Mock.mock( rurl, [rtype], function( options ) ) 的回调函数返回 Promise 对象#236
luozhihua wants to merge 2 commits intonuysoft:refactoringfrom
luozhihua:refactoring

Conversation

@luozhihua
Copy link

@luozhihua luozhihua commented Oct 22, 2017

支持以下 mock 方式:

Mock.mock(/.json/, 'post', function() {
    return new Promise(function(resolve, reject) {
        setTimeout(function() {
            resolve(Mock.mock({
                name: "@cname"
            }))
        })
    })
})

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 53e0d21 on luozhihua:refactoring into ** on nuysoft:refactoring**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d6ae91f on luozhihua:refactoring into ** on nuysoft:refactoring**.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants