dhuang684@gmail.com
(608) 692-5471
New York, NY
Github|Linkedin
Languages: HTML5 CSS3 JavaScript PostgreSQL
Frameworks: React Redux Express Mocha
const fs = require('fs'); | |
const csv = require('fast-csv'); | |
const path = require('path'); | |
const inputFile = require('path').join(getDir() + '/sample-data/input.csv'); | |
const outputFile = require('path').join(getDir() + '/sample-data/output.csv'); | |
function getDir() { | |
if (process.pkg) { |
'use strict'; | |
var {Builder} = require('selenium-webdriver'); | |
// added chromedriver to path | |
require('chromedriver'); | |
var chrome = require('selenium-webdriver/chrome'); | |
var By = require('selenium-webdriver').By; |
'use strict'; | |
var expect = require('unexpected').clone(); | |
expect.installPlugin(require('unexpected-dom')); | |
//I am calling events and reporters like this because otherwise it says undefined | |
var events = require('../../lib/runner').constants | |
var reporters = require('../../lib/reporters'); | |
//I have console.log the events and confirmed the events are showing up. | |
// console.log('this is events', events) | |
var Base = reporters.Base |
'use strict'; | |
var events = require('../../lib/runner').constants; | |
var helpers = require('../reporters/helpers'); | |
var reporters = require('../../lib/mocha').reporters; | |
describe('browser error bar', function() { | |
var htmlReporter; | |
var runner; | |
var suite; |
dhuang684@gmail.com
(608) 692-5471
New York, NY
Github|Linkedin
Languages: HTML5 CSS3 JavaScript PostgreSQL
Frameworks: React Redux Express Mocha
import React from 'react' | |
import {connect} from 'react-redux' | |
import {fetchCart} from '../store/cart' | |
export class Cart extends React.Component { | |
componentDidMount() { | |
this.props.getCart() | |
} | |
render() { | |
const cart = this.props.cart | |
return ( |
// @flow | |
import React from 'react'; | |
import { QuickCreate } from '../../widgets/QuickCreate'; | |
import type { Props as QuickCreateProps } from '../../widgets/QuickCreate'; | |
export const displayQuickCreate = (input: QuickCreateProps) => { | |
const { | |
id, name, label, placeholder, checkboxes, formProps, | |
} = input; |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Mocha</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="../../mocha.css"> | |
</head> | |
<body> | |
<div id="mocha"></div> |
describe('Array', function(){ | |
describe('.push()', function(){ | |
it('should append a value', function(){ | |
var arr = []; | |
arr.push('foo'); | |
arr.push('bar'); | |
expect(arr[0]).to.equal('foo'); | |
expect(arr[1]).to.equal('bar'); | |
}) |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Rhymus Tests</title> | |
<link rel="stylesheet" media="all" href="../node_modules/mocha/mocha.css"> | |
</head> | |
<body> |