View mock.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { mount } from 'enzyme'; | |
import toJSON from 'enzyme-to-json'; | |
import wait from 'waait'; | |
import Nav from '../components/Nav'; | |
import { CURRENT_USER_QUERY } from '../components/User'; | |
import { MockedProvider } from 'react-apollo/test-utils'; | |
import { fakeUser, fakeCartItem } from '../lib/testUtils'; | |
const notSignedInMocks = [ | |
{ |
View SketchSystems.spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Demo Card State | |
main* | |
lets do it -> doitmain | |
ill do it -> diymain | |
doitmain | |
do it for me -> jomain | |
ill do it -> diymain | |
jomain |
View index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
let Wit = null; | |
let log = null; | |
try { | |
// if running from repo | |
Wit = require('./lib/wit'); | |
log = require('./lib/log'); | |
} catch (e) { | |
console.log('2'); |
View index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const bodyParser = require('body-parser'); | |
const crypto = require('crypto'); | |
const express = require('express'); | |
const fetch = require('node-fetch'); | |
const request = require('request'); | |
const config = require('./config'); | |
const LevelUp = require('./lib/levelup').LevelUp; |
View gist:e0200233663b2cf1ce1d0a5a33559372
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index.js (custom action) | |
------------------------- | |
activate_schedule({sessionId, context, entities}) { | |
return new Promise(function(resolve, reject) { | |
LevelUp.set_activation_state(sessions[sessionId].fbid, true) | |
.then(user_schedule => { | |
console.log(user_schedule); | |
// if(user_schedule.schedule_on){ | |
// context.schedule_active= true; | |
// delete context.schedule_inactive; |