The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/.storybook/mocks/meteor.js

84 lines
1.3 KiB

export const Meteor = {
Device: {
isDesktop: () => false,
},
isClient: true,
isServer: false,
_localStorage: window.localStorage,
absoluteUrl: () => {},
userId: () => {},
Streamer: () => ({
on: () => {},
removeListener: () => {},
}),
startup: () => {},
methods: () => {},
call: () => {},
};
Meteor.absoluteUrl.defaultOptions = {};
export const Tracker = {
autorun: () => ({
stop: () => {},
}),
nonreactive: (fn) => fn(),
Dependency: () => {},
};
export const Accounts = {};
export const Mongo = {
Collection: () => ({
find: () => ({
observe: () => {},
fetch: () => [],
}),
}),
};
export const ReactiveVar = (val) => {
let currentVal = val;
return {
get: () => currentVal,
set: (val) => { currentVal = val; },
};
};
export const ReactiveDict = () => ({
get: () => {},
set: () => {},
all: () => {},
});
export const Template = () => ({
onCreated: () => {},
onRendered: () => {},
onDestroyed: () => {},
helpers: () => {},
events: () => {},
});
Template.registerHelper = () => {};
Template.__checkName = () => {};
export const Blaze = {
Template,
registerHelper: () => {},
};
window.Blaze = Blaze;
export const check = () => {};
export const FlowRouter = {
route: () => {},
group: () => ({
route: () => {},
}),
};
export const Session = {
get: () => {},
set: () => {},
};