Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

augur-ui-react-components

Package Overview
Dependencies
Maintainers
4
Versions
221
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

augur-ui-react-components - npm Package Compare versions

Comparing version 3.0.12 to 3.0.13

hooks/pre-commit.sh

3

package.json
{
"name": "augur-ui-react-components",
"version": "3.0.12",
"version": "3.0.13",
"description": "Augur UI React Components",

@@ -80,2 +80,3 @@ "author": "Baz (@thinkloop)",

"rimraf": "2.5.3",
"shared-git-hooks": "1.2.1",
"uglify-js": "2.7.0",

@@ -82,0 +83,0 @@ "watchify": "3.7.0"

import React, { PropTypes, Component } from 'react';
import classnames from 'classnames';

@@ -60,3 +59,3 @@ import SiteHeader from '../../site/components/site-header';

<tbody>
<tr className={classnames('account-info-item', { fade: s.editPassword })}>
<tr className="account-info-item">
<th className="title">Account Name:</th>

@@ -111,3 +110,3 @@ <td className="item">

<tr className={classnames('account-info-item', { fade: s.editPassword })}>
<tr className="account-info-item">
<th className="title">Secure Login ID:</th>

@@ -220,3 +219,3 @@ <td className="item">

<div className="account-section">
<div className={s.editPassword ? 'account-info-item fade' : 'account-info-item'}>
<div className="account-info-item">
<h2 className="heading">Download Account</h2>

@@ -223,0 +222,0 @@ <p>

@@ -5,2 +5,3 @@ import React, { Component, PropTypes } from 'react';

import Input from '../../common/components/input';
import Checkbox from '../../common/components/checkbox';

@@ -11,4 +12,4 @@ export default class AuthForm extends Component {

title: PropTypes.string,
password: PropTypes.string,
secureLoginID: PropTypes.string,
rememberMe: PropTypes.bool,
passwordPlaceholder: PropTypes.string,

@@ -19,2 +20,4 @@ password2Placeholder: PropTypes.string,

isVisiblePassword2: PropTypes.bool,
isVisibleID: PropTypes.bool,
isVisibleRememberMe: PropTypes.bool,
clearName: PropTypes.bool,

@@ -35,2 +38,6 @@ clearPassword: PropTypes.bool,

static defaultProps = {
rememberMe: false
};
constructor(props) {

@@ -41,3 +48,4 @@ super(props);

msg: this.props.msg,
secureLoginID: this.props.secureLoginID
secureLoginID: this.props.secureLoginID,
rememberMe: this.props.rememberMe
};

@@ -69,5 +77,6 @@ }

const password2 = this.refs.password2.value;
const rememberMe = this.state.rememberMe;
this.setState({ msg: '' });
setTimeout(() =>
this.props.onSubmit(name, password, password2, secureLoginID), 100);
this.props.onSubmit(name, password, password2, secureLoginID, rememberMe), 100);
}

@@ -131,2 +140,9 @@

/>
<Checkbox
className={classnames({ displayNone: !p.isVisibleRememberMe })}
title="Click Here to remember your account information locally."
text="Remember Me"
isChecked={s.rememberMe}
onClick={() => this.setState({ rememberMe: !s.rememberMe })}
/>
{p.bottomLinkText &&

@@ -133,0 +149,0 @@ <Link

import React, { PropTypes } from 'react';
import classnames from 'classnames';
import { EXPIRY_SOURCE_GENERIC, EXPIRY_SOURCE_SPECIFIC } from '../../create-market/constants/market-values-constraints';
import InputList from '../../common/components/input-list';

@@ -15,6 +14,6 @@ import FormButtons from '../../create-market/components/create-market-form-buttons';

<input
value={EXPIRY_SOURCE_GENERIC}
value={p.expirySourceTypes.generic}
type="radio"
checked={p.expirySource === EXPIRY_SOURCE_GENERIC}
onChange={() => p.onValuesUpdated({ expirySource: EXPIRY_SOURCE_GENERIC })}
checked={p.expirySource === p.expirySourceTypes.generic}
onChange={() => p.onValuesUpdated({ expirySource: p.expirySourceTypes.generic })}
/>

@@ -25,10 +24,10 @@ <span>Outcome will be covered by local, national or international news media.</span>

<input
value={EXPIRY_SOURCE_SPECIFIC}
value={p.expirySourceTypes.specific}
type="radio"
checked={p.expirySource === EXPIRY_SOURCE_SPECIFIC}
onChange={() => p.onValuesUpdated({ expirySource: EXPIRY_SOURCE_SPECIFIC })}
checked={p.expirySource === p.expirySourceTypes.specific}
onChange={() => p.onValuesUpdated({ expirySource: p.expirySourceTypes.specific })}
/>
<span>Outcome will be detailed on a specific publicly available website:</span>
</span>
<div className={classnames('expiry-source-url', { displayNone: p.expirySource !== EXPIRY_SOURCE_SPECIFIC })}>
<div className={classnames('expiry-source-url', { displayNone: p.expirySource !== p.expirySourceTypes.specific })}>
<Input

@@ -85,2 +84,3 @@ type="text"

expirySourceUrl: PropTypes.string,
expirySourceTypes: PropTypes.object,
tags: PropTypes.array,

@@ -87,0 +87,0 @@ tagsMaxNum: PropTypes.number,

@@ -17,2 +17,3 @@ import loginAccount from './login-account';

isVisiblePassword2: false,
isVisibleRememberMe: true,
topLinkText: 'Sign Up',

@@ -29,2 +30,3 @@ };

isVisiblePassword2: true,
isVisibleRememberMe: false,
topLinkText: 'login',

@@ -62,3 +64,3 @@ onSubmit: SignUpOnSubmit,

},
onSubmit: (secureLoginID, password) => {
onSubmit: (name, password, password2, secureLoginID, rememberMe) => {
require('../selectors').update({ authForm: { ...signUp, clearName: true,

@@ -65,0 +67,0 @@ clearPassword: true } });

@@ -1,3 +0,1 @@

import { TAKER_FEE_DEFAULT, MAKER_FEE_DEFAULT, INITIAL_LIQUIDITY_DEFAULT, STARTING_QUANTITY_DEFAULT, BEST_STARTING_QUANTITY_DEFAULT, PRICE_WIDTH_DEFAULT, SEPARATION_DEFAULT } from '../modules/create-market/constants/market-values-constraints';
import { BINARY, CATEGORICAL, SCALAR } from '../modules/markets/constants/market-types';

@@ -8,2 +6,13 @@

function createMarketForm() {
const CONSTANTS = {
TAKER_FEE_DEFAULT: 2,
MAKER_FEE_DEFAULT: 1,
INITIAL_LIQUIDITY_DEFAULT: 500,
STARTING_QUANTITY_DEFAULT: 10,
BEST_STARTING_QUANTITY_DEFAULT: 20,
PRICE_WIDTH_DEFAULT: 0.1,
EXPIRY_SOURCE_GENERIC: 'generic',
EXPIRY_SOURCE_SPECIFIC: 'specific'
};
let form = {

@@ -14,11 +23,14 @@ creatingMarket: true,

isValid: true,
takerFee: TAKER_FEE_DEFAULT,
makerFee: MAKER_FEE_DEFAULT,
initialLiquidity: INITIAL_LIQUIDITY_DEFAULT,
takerFee: CONSTANTS.TAKER_FEE_DEFAULT,
makerFee: CONSTANTS.MAKER_FEE_DEFAULT,
initialLiquidity: CONSTANTS.INITIAL_LIQUIDITY_DEFAULT,
expirySourceTypes: {
generic: CONSTANTS.EXPIRY_SOURCE_GENERIC,
specific: CONSTANTS.EXPIRY_SOURCE_SPECIFIC,
},
// Advanced Market Creation
initialFairPrices: {},
startingQuantity: STARTING_QUANTITY_DEFAULT,
bestStartingQuantity: BEST_STARTING_QUANTITY_DEFAULT,
priceWidth: PRICE_WIDTH_DEFAULT,
separation: SEPARATION_DEFAULT,
startingQuantity: CONSTANTS.STARTING_QUANTITY_DEFAULT,
bestStartingQuantity: CONSTANTS.BEST_STARTING_QUANTITY_DEFAULT,
priceWidth: CONSTANTS.PRICE_WIDTH_DEFAULT,
onValuesUpdated: newValues => updateForm(newValues)

@@ -25,0 +37,0 @@ };

@@ -26,2 +26,5 @@ import { assert } from 'chai';

assert.isDefined(authForm.isVisibleID, `authForm.isVisibleID isn't defined`);
assert.isBoolean(authForm.isVisibleID, `authForm.isVisibleID isn't a boolean`);
assert.isDefined(authForm.isVisiblePassword, `authForm.isVisiblePassword isn't defined`);

@@ -33,2 +36,5 @@ assert.isBoolean(authForm.isVisiblePassword, `authForm.isVisiblePassword isn't a boolean`);

assert.isDefined(authForm.isVisibleRememberMe, `authForm.isVisibleRememberMe isn't defined`);
assert.isBoolean(authForm.isVisibleRememberMe, `authForm.isVisibleRememberMe isn't a boolean`);
assert.isDefined(authForm.msgClass, `authForm.msgClass isn't defined`);

@@ -35,0 +41,0 @@ assert.isString(authForm.msgClass, `authForm.msgClass isn't a string`);

@@ -8,213 +8,444 @@ import { assert } from 'chai';

export default function(createMarketForm) {
// implement me
}
describe('createMarketForm', () => {
describe(`step ${createMarketForm.step} state`, () => {
switch(createMarketForm.step){
case 1:
describe('step', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.step, `'step' is not defined`);
});
function step1(actual){
describe('augur-ui-react-components createMarketForm step-1 initial state', () => {
it('should receive step and be a number', () => {
assert.isDefined(actual.step, 'step is not defined');
assert.isNumber(actual.step, 'step is not a number');
});
it('should be a number', () => {
assert.isNumber(createMarketForm.step, `'step' is not a number`);
});
});
it('should receive creatingMarket and be a boolean', () => {
assert.isDefined(actual.creatingMarket, 'creatingMarket is not defined');
assert.isBoolean(actual.creatingMarket, 'creatingMarket is not a boolean');
});
describe('creatingMarket', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.creatingMarket, `'creatingMarket' is not defined`);
});
it('should receive errors and be an object', () => {
assert.isDefined(actual.errors, 'errors is not defined');
assert.isObject(actual.errors, 'errors is not an object');
});
it('should be a boolean', () => {
assert.isBoolean(createMarketForm.creatingMarket, `'creatingMarket' is not a boolean`);
});
});
it('should receive onValuesUpdated and be a function', () => {
assert.isDefined(actual.onValuesUpdated, 'onValuesUpdated is not defined');
assert.isFunction(actual.onValuesUpdated, 'onValuesUpdated is not a function');
});
});
}
describe('errors', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.errors, `'errors' is not defined`);
});
function step2(actual){
describe(`augur-ui-react-components createMarketForm step-2 ${actual.type} market initial state`, () => {
it('should receive type and be a string', () => {
assert.isDefined(actual.type, 'type is not defined');
assert.isString(actual.type, 'type is not a string');
});
it('should be a object', () => {
assert.isObject(createMarketForm.errors, `'errors' is not an object`);
});
});
it('should receive initialFairPrices and be an object with correct shape', () => {
assert.isDefined(actual.initialFairPrices, 'initialFairPrices is not defined');
assert.isObject(actual.initialFairPrices, 'initialFairPrices is not an object');
assertInitialFairPrices(actual.initialFairPrices, 'createMarketForm');
});
describe('onValuesUpdated', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.onValuesUpdated, `'onValuesUpdated' is not defined`);
});
it('should receive descriptionPlaceholder and be a string', () => {
assert.isDefined(actual.descriptionPlaceholder, 'descriptionPlaceholder is not defined');
assert.isString(actual.descriptionPlaceholder, 'descriptionPlaceholder is not a string');
});
it('should be a function', () => {
assert.isFunction(createMarketForm.onValuesUpdated, `onValuesUpdated' is not a function`);
});
});
it('should receive descriptionMaxLength and be a number', () => {
assert.isDefined(actual.descriptionMaxLength, 'descriptionMaxLength is not defined');
assert.isNumber(actual.descriptionMaxLength, 'descriptionMaxLength is not a number');
});
break;
case 2:
describe('type', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.type, `'type' is not defined`);
});
switch(actual.type){
case 'categorical':
it('should receive categoricalOutcomesMinNum and be a number', () => {
assert.isDefined(actual.categoricalOutcomesMinNum, 'categoricalOutcomesMinNum is not defined');
assert.isNumber(actual.categoricalOutcomesMinNum, 'categoricalOutcomesMinNum is not a number');
});
it('should be a string', () => {
assert.isString(createMarketForm.type, `'type' is not a string`);
});
});
it('should receive categoricalOutcomesMaxNum and be a number', () => {
assert.isDefined(actual.categoricalOutcomesMaxNum, 'categoricalOutcomesMaxNum is not defined');
assert.isNumber(actual.categoricalOutcomesMaxNum, 'categoricalOutcomesMaxNum is not a number');
});
describe('initialFairPrices', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.initialFairPrices, `'initialFairPrices' is not defined`);
});
it('should receive categoricalOutcomeMaxLength and be a number', () => {
assert.isDefined(actual.categoricalOutcomeMaxLength, 'categoricalOutcomeMaxLength is not defined');
assert.isNumber(actual.categoricalOutcomeMaxLength, 'categoricalOutcomeMaxLength is not a number');
});
break;
case 'scalar':
it('should receive scalarSmallNum and be a number', () => {
assert.isDefined(actual.scalarSmallNum, 'scalarSmallNum is not defined');
assert.isNumber(actual.scalarSmallNum, 'scalarSmallNum is not a number');
});
it('should be an object', () => {
assert.isObject(createMarketForm.initialFairPrices, `'initialFairPrices' is not an object`);
});
it('should receive scalarBigNum and be a number', () => {
assert.isDefined(actual.scalarBigNum, 'scalarBigNum is not defined');
assert.isNumber(actual.scalarBigNum, 'scalarBigNum is not a number');
});
break;
}
});
}
it('should have the correct shape', () => {
assertInitialFairPrices(createMarketForm.initialFairPrices, 'createMarketForm');
});
});
function step3(actual){
describe('augur-ui-react-components createMarketForm step-3 initial state', () => {
it('should receive description and be a string', () => {
assert.isDefined(actual.description, 'description is not defined');
assert.isString(actual.description, 'description is not a string');
});
describe('descriptionPlaceholder', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.descriptionPlaceholder, `'descriptionPlaceholder' is not defined`);
});
it('should receive tagMaxNum and be a number', () => {
assert.isDefined(actual.tagsMaxNum, 'tagsMaxNum is not defined');
assert.isNumber(actual.tagsMaxNum, 'tagsMaxNum is not a number');
});
it('should be a string', () => {
assert.isString(createMarketForm.descriptionPlaceholder, `'descriptionPlaceholder' is not a string`);
});
});
it('should receive tagsMaxLength and be a number', () => {
assert.isDefined(actual.tagMaxLength, 'tagsMaxLength is not defined');
assert.isNumber(actual.tagMaxLength, 'tagsMaxLength is not a number');
});
});
}
describe('descriptionMaxLength', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.descriptionMaxLength, `'descriptionMaxLength' is not defined`);
});
function step4(actual){
describe('augur-ui-react-components createMarketForm step-4 initial state', () => {
it('should receive takerFee and be a number', () => {
assert.isDefined(actual.takerFee, 'makerFee is not defined');
assert.isNumber(actual.takerFee, 'makerFee is not a number');
});
it('should be a number', () => {
assert.isNumber(createMarketForm.descriptionMaxLength, `'descriptionMaxLength' is not a number`);
});
});
it('should receive makerFee and be a number', () => {
assert.isDefined(actual.makerFee, 'makerFee is not defined');
assert.isNumber(actual.makerFee, 'makerFee is not a number');
});
describe(`type: ${createMarketForm.type}`, () => {
switch(createMarketForm.type){
case 'categorical':
describe('categoricalOutcomesMinNum', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.categoricalOutcomesMinNum, `'categoricalOutcomesMinNum' is not defined`);
});
it('should receive initialLiquidity and be a number', () => {
assert.isDefined(actual.initialLiquidity, 'initialLiquidity is not defined');
assert.isNumber(actual.initialLiquidity, 'initialLiquidity is not a number');
});
it('should be a number', () => {
assert.isNumber(createMarketForm.categoricalOutcomesMinNum, `'categoricalOutcomesMinNum' is not a number`);
});
});
it('should receive initialFairPrices and be an object with correct shape', () => {
assert.isDefined(actual.initialFairPrices, 'initialFairPrices is not defined');
assert.isObject(actual.initialFairPrices, 'initialFairPrices is not an object');
assertInitialFairPrices(actual.initialFairPrices, 'createMarketForm');
});
describe('categoricalOutcomesMaxNum', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.categoricalOutcomesMaxNum, `'categoricalOutcomesMaxNum' is not defined`);
});
it('should receive bestStartingQuantity and be a number', () => {
assert.isDefined(actual.bestStartingQuantity, 'bestStartingQuantity is not defined');
assert.isNumber(actual.bestStartingQuantity, 'bestStartingQuantity is not a number');
});
it('should be a number', () => {
assert.isNumber(createMarketForm.categoricalOutcomesMaxNum, `'categoricalOutcomesMaxNum' is not a number`);
});
});
it('should receive startingQuantity and be a number', () => {
assert.isDefined(actual.startingQuantity, 'startingQuantity is not defined');
assert.isNumber(actual.startingQuantity, 'startingQuantity is not a number');
});
describe('categoricalOutcomeMaxLength', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.categoricalOutcomeMaxLength, `'categoricalOutcomeMaxLength' is not defined`);
});
it('should receive priceWidth and be a number', () => {
assert.isDefined(actual.priceWidth, 'priceWidth is not defined');
assert.isNumber(actual.priceWidth, 'priceWidth is not a number');
});
it('should be a number', () => {
assert.isNumber(createMarketForm.categoricalOutcomeMaxLength, `'categoricalOutcomeMaxLength' is not a number`);
});
});
break;
case 'scalar':
describe('scalarSmallNum', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.scalarSmallNum, `'scalarSmallNum' is not defined`);
});
it('should receive priceDepth and be a number', () => {
assert.isDefined(actual.priceDepth, 'priceDepth is not defined');
assert.isNumber(actual.priceDepth, 'priceDepth is not a number');
});
});
}
it('should be a number', () => {
assert.isNumber(createMarketForm.scalarSmallNum, `'scalarSmallNum' is not a number`);
});
});
function step5(actual){
describe('augur-ui-react-components createMarketForm step-5 initial state', () => {
it('should receive description and be a string', () => {
assert.isDefined(actual.description, 'description is not defined');
assert.isString(actual.description, 'description is not a string');
});
describe('scalarBigNum', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.scalarBigNum, `'scalarBigNum' is not defined`);
});
it('should receive outcomes and be an array', () => {
assert.isDefined(actual.outcomes, 'outcomes is not defined');
assert.isArray(actual.outcomes, 'outcomes is not an array');
});
it('should be a number', () => {
assert.isNumber(createMarketForm.scalarBigNum, `'scalarBigNum' is not a number`);
});
});
break;
}
});
it('should receive endDate and be an object with correct shape', () => {
assert.isDefined(actual.endDate, 'endDate is not defined');
assert.isObject(actual.endDate, 'endDate is not an array');
assertEndDate(actual.endDate, 'createMarketForm');
});
break;
case 3:
describe('description', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.description, `'description' is not defined`);
});
it('should receive takerFeePercent and be an object with correct shape', () => {
assert.isDefined(actual.takerFeePercent, 'takerFeePercent is not defined');
assert.isObject(actual.takerFeePercent, 'takerFeePercent is not an object');
assertFormattedNumber(actual.takerFeePercent, 'createMarketForm.takerFeePercent');
});
it('should be a string', () => {
assert.isString(createMarketForm.description, `'description' is not a string`);
});
});
it('should receive makerFeePercent and be an object with correct shape', () => {
assert.isDefined(actual.makerFeePercent, 'makerFeePercent is not defined');
assert.isObject(actual.makerFeePercent, 'makerFeePercent is not an object');
assertFormattedNumber(actual.makerFeePercent, 'createMarketForm.makerFeePercent');
});
describe('tagsMaxNum', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.tagsMaxNum, `'tagsMaxNum' is not defined`);
});
it('should receive creatingMarket and be a boolean', () => {
assert.isDefined(actual.creatingMarket, 'creatingMarket is not defined');
assert.isBoolean(actual.creatingMarket, 'creatingMarket is not a boolean');
});
it('should be a number', () => {
assert.isNumber(createMarketForm.tagsMaxNum, `'tagsMaxNum' is not a number`);
});
});
it('should receive volume and be an object with correct shape', () => {
assert.isDefined(actual.volume, 'volume is not defined');
assert.isObject(actual.volume, 'volume is not an object');
assertFormattedNumber(actual.volume, 'createMarketForm.volume');
});
describe('tagMaxLength', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.tagMaxLength, `'tagsMaxLength' is not defined`);
});
it('should receive initialFairPrices and be an object with correct shape', () => {
assert.isDefined(actual.initialFairPrices, 'initialFairPrices is not defined');
assert.isObject(actual.initialFairPrices, 'initialFairPrices is not an object');
assertInitialFairPrices(actual.initialFairPrices, 'createMarketForm');
});
it('should be a number', () => {
assert.isNumber(createMarketForm.tagMaxLength, `'tagsMaxLength' is not a number`);
});
});
it('should receive bestStartingQuantityFormatted and be an object with correct shape', () => {
assert.isDefined(actual.bestStartingQuantityFormatted, 'bestStartingQuantityFormatted is not defined');
assert.isObject(actual.bestStartingQuantityFormatted, 'bestStartingQuantityFormatted is not an object');
assertFormattedNumber(actual.bestStartingQuantityFormatted, 'createMarketForm.bestStartingQuantityFormatted');
});
describe('expirySourceTypes', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.expirySourceTypes, `'expirySourceTypes' is not defined`);
});
it('should receive startingQuantityFormatted and be an object with correct shape', () => {
assert.isDefined(actual.startingQuantityFormatted, 'startingQuantityFormatted is not defined');
assert.isObject(actual.startingQuantityFormatted, 'startingQuantityFormatted is not an object');
assertFormattedNumber(actual.startingQuantityFormatted, 'createMarketForm.startingQuantityFormatted');
});
it('should be an object', () => {
assert.isObject(createMarketForm.expirySourceTypes, `'expirySourceTypes' is not an object`);
});
it('should receive priceWidthFormatted and be an object with correct shape', () => {
assert.isDefined(actual.priceWidthFormatted, 'priceWidthFormatted is not defined');
assert.isObject(actual.priceWidthFormatted, 'priceWidthFormatted is not an object');
assertFormattedNumber(actual.priceWidthFormatted, 'createMarketForm.priceWidthFormatted');
describe('generic', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.expirySourceTypes.generic, `'expirySourceTypes.generic' is not defined`);
});
it('should be a string', () => {
assert.isString(createMarketForm.expirySourceTypes.generic, `'expirySourceTypes.generic' is not a string`);
});
});
describe('specific', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.expirySourceTypes.specific, `'expirySourceTypes.specific' is not defined`);
});
it('should be a string', () => {
assert.isString(createMarketForm.expirySourceTypes.specific, `'expirySourceTypes.specific' is not a string`);
});
});
});
break;
case 4:
describe('takerFee', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.takerFee, `'takerFee' is not defined`);
});
it('should be a number', () => {
assert.isNumber(createMarketForm.takerFee, `'takerFee' is not a number`);
});
});
describe('makerFee', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.makerFee, `'makerFee' is not defined`);
});
it('should be a number', () => {
assert.isNumber(createMarketForm.makerFee, `'makerFee' is not a number`);
});
});
describe('initialLiquidity', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.initialLiquidity, `'initialLiquidity' is not defined`);
});
it('should be a number', () => {
assert.isNumber(createMarketForm.initialLiquidity, `'initialLiquidity' is not a number`);
});
});
describe('initialFairPrices', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.initialFairPrices, `'initialFairPrices' is not defined`);
});
it('should be an object', () => {
assert.isObject(createMarketForm.initialFairPrices, `'initialFairPrices' is not an object`);
});
it('should have the correct shape', () => {
assertInitialFairPrices(createMarketForm.initialFairPrices, 'createMarketForm');
});
});
describe('bestStartingQuantity', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.bestStartingQuantity, `'bestStartingQuantity' is not defined`);
});
it('should be a number', () => {
assert.isNumber(createMarketForm.bestStartingQuantity, `'bestStartingQuantity' is not a number`);
});
});
describe('startingQuantity', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.startingQuantity, `'startingQuantity' is not defined`);
});
it('should be a number', () => {
assert.isNumber(createMarketForm.startingQuantity, `'startingQuantity' is not a number`);
});
});
describe('priceWidth', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.priceWidth, `'priceWidth' is not defined`);
});
it('should be a number', () => {
assert.isNumber(createMarketForm.priceWidth, `'priceWidth' is not a number`);
});
});
describe('priceDepth', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.priceDepth, `'priceDepth' is not defined`);
});
it('should be a number', () => {
assert.isNumber(createMarketForm.priceDepth, `'priceDepth' is not a number`);
});
});
break;
default:
case 5:
describe('description', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.description, `'description' is not defined`);
});
it('should be a string', () => {
assert.isString(createMarketForm.description, `'description' is not a string`);
});
});
describe('outcomes', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.outcomes, `'outcomes' is not defined`);
});
it('should be an array', () => {
assert.isArray(createMarketForm.outcomes, `'outcomes' is not an array`);
});
});
describe('endDate', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.endDate, `'endDate' is not defined`);
});
it('should be an object', () => {
assert.isObject(createMarketForm.endDate, `'endDate' is not an object`);
});
it('should have the correct shape', () => {
assertEndDate(createMarketForm.endDate, 'createMarketForm');
});
});
describe('takerFeePercent', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.takerFeePercent, `'takerFeePercent' is not defined`);
});
it('should be an object', () => {
assert.isObject(createMarketForm.takerFeePercent, `'takerFeePercent' is not an object`);
});
it('should have the correct shape', () => {
assertFormattedNumber(createMarketForm.takerFeePercent, 'createMarketForm.takerFeePercent');
});
});
describe('makerFeePercent', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.makerFeePercent, `'makerFeePercent' is not defined`);
});
it('should be an object', () => {
assert.isObject(createMarketForm.makerFeePercent, `'makerFeePercent' is not an object`);
});
it('should have the correct shape', () => {
assertFormattedNumber(createMarketForm.makerFeePercent, 'createMarketForm.makerFeePercent');
});
});
describe('creatingMarket', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.creatingMarket, `'creatingMarket' is not defined`);
});
it('should be a boolean', () => {
assert.isBoolean(createMarketForm.creatingMarket, `'creatingMarket' is not a boolean`);
});
});
describe('volume', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.volume, `'volume' is not defined`);
});
it('should be an object', () => {
assert.isObject(createMarketForm.volume, `'volume' is not an object`);
});
it('should have the correct shape', () => {
assertFormattedNumber(createMarketForm.volume, 'createMarketForm.volume');
});
});
describe('initialFairPrices', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.initialFairPrices, `'initialFairPrices' is not defined`);
});
it('should be an object', () => {
assert.isObject(createMarketForm.initialFairPrices, `'initialFairPrices' is not an object`);
});
it('should have the correct shape', () => {
assertInitialFairPrices(createMarketForm.initialFairPrices, 'createMarketForm.initialFairPrices');
});
});
describe('bestStartingQuantityFormatted', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.bestStartingQuantityFormatted, `'bestStartingQuantityFormatted' is not defined`);
});
it('should be an object', () => {
assert.isObject(createMarketForm.bestStartingQuantityFormatted, `'bestStartingQuantityFormatted' is not an object`);
});
it('should have the correct shape', () => {
assertFormattedNumber(createMarketForm.bestStartingQuantityFormatted, 'createMarketForm.bestStartingQuantityFormatted');
});
});
describe('startingQuantityFormatted', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.startingQuantityFormatted, `'startingQuantityFormatted' is not defined`);
});
it('should be an object', () => {
assert.isObject(createMarketForm.startingQuantityFormatted, `'startingQuantityFormatted' is not an object`);
});
it('should have the correct shape', () => {
assertFormattedNumber(createMarketForm.startingQuantityFormatted, 'createMarketForm.startingQuantityFormatted');
});
});
describe('priceWidthFormatted', () => {
it('should be defined', () => {
assert.isDefined(createMarketForm.priceWidthFormatted, `'priceWidthFormatted' is not defined`);
});
it('should be an object', () => {
assert.isObject(createMarketForm.priceWidthFormatted, `'priceWidthFormatted' is not an object`);
});
it('should have the correct shape', () => {
assertFormattedNumber(createMarketForm.priceWidthFormatted, 'createMarketForm.priceWidthFormatted');
});
});
}
});
});
}
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc