Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Моки за http #352

Open
zerkalica opened this issue Aug 19, 2019 · 0 comments
Open

Моки за http #352

zerkalica opened this issue Aug 19, 2019 · 0 comments

Comments

@zerkalica
Copy link
Collaborator

Сейчас пишутся моки на данные, которые через контексты подменяют настоящие модели.
https://github.com/zerkalica/tss/blob/master/reports/domain/mock/mock.ts

Хотелось бы для более полноценных демок иметь возможность эти моки заворачивать за эмулятор http, что б проверять как асинхронность скажется на ui.

$mol_http.resource( 'users.json' ).json()
$mol_http_mock.register({
  'users.json': () => $my_user_mock.all()
})

$mol_http_mock.delay(1000)
$mol_http_mock.error_rate(50)

$mol_http_mock - эмулирует запрос на сервер с определенным качеством связи.

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

No branches or pull requests

2 participants