UNPKG

memserver

Version:

in-memory database/ORM and http mock server you can run in-browser and node environments. Built for large frontend teams, fast tests and rapid prototyping

20 lines (16 loc) 427 B
declare global { interface Window { User: any; PhotoComment: any; } } import users from "./fixtures/users"; import photoComments from './fixtures/photo-comments'; import User from "./models/user"; import PhotoComment from './models/photo-comment'; export default function() { window.User = User; window.PhotoComment = PhotoComment; User.resetDatabase(users); PhotoComment.resetDatabase(photoComments); }