Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate test data #239

Open
gregstewart opened this issue Nov 26, 2016 · 0 comments
Open

Generate test data #239

gregstewart opened this issue Nov 26, 2016 · 0 comments

Comments

@gregstewart
Copy link
Owner

gregstewart commented Nov 26, 2016

Just throwing some ideas out there...

generateResult().wins(2).as(‘Priest').against(‘Warlock’).and(‘Druid);
generateResult(
 [ doc(for(‘rogue’), true, against(‘shaman’), 1453420291617, 10)]
)

class(‘druid’).beats().class(’Shaman’),
class(‘rogue’).looses().class(‘warlock’),
class(‘rogue’).beats().class(‘warlock’),
class(‘rogue’).beats().class(‘mage’),
class(‘rogue’).looses().class(‘rogue’),
class(‘priest’).beats().class(’Shaman’),

for = (className)  => {
     return {
	name: randomName(),
        id: 1,
        class: className
     }
}

against = (className) => {
     return {
        name: randomName(),
        id: 2,
        class: className
      }
},

/**
for: Me
against: my opponent
started: unix time stamp
lasted: time in minutes the match lasted
*/
doc = (for, outcome, against, started, lasted) => {
	startTime: toDate(started)
	endTime: toDate(started).add(lasted)
	for: for
        against: against
        log: []
        hasWon: outcome
       _id: toString(started)
       _rev: ‘some pouch db value'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant