mirror of https://github.com/lukechilds/docs.git
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.
25 lines
369 B
25 lines
369 B
6 years ago
|
'use strict';
|
||
|
const state = {
|
||
|
PENDING: 0,
|
||
|
COMPLETED: 1,
|
||
|
FAILED: 2,
|
||
|
SKIPPED: 3
|
||
|
};
|
||
|
|
||
|
state.toString = input => {
|
||
|
switch (input) {
|
||
|
case state.PENDING:
|
||
|
return 'pending';
|
||
|
case state.COMPLETED:
|
||
|
return 'completed';
|
||
|
case state.FAILED:
|
||
|
return 'failed';
|
||
|
case state.SKIPPED:
|
||
|
return 'skipped';
|
||
|
default:
|
||
|
return 'unknown';
|
||
|
}
|
||
|
};
|
||
|
|
||
|
module.exports = state;
|