1
0
Fork 0

resolves merges conflicts

This commit is contained in:
BZ Libby 2020-08-15 17:37:03 -05:00 committed by BZ Libby
parent 65b0de5cee
commit 6e530e5937
4 changed files with 24 additions and 21 deletions

View File

@ -2,20 +2,12 @@
[Home](./index.md) > [cautious-journey](./cautious-journey.md) > [FlagLabel](./cautious-journey.flaglabel.md)
## FlagLabel interface
## FlagLabel type
Individual labels: the equivalent of a checkbox.
<b>Signature:</b>
```typescript
export interface FlagLabel extends BaseLabel, ChangeSet
export declare type FlagLabel = BaseLabel;
```
<b>Extends:</b> BaseLabel, ChangeSet
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [requires](./cautious-journey.flaglabel.requires.md) | Array&lt;LabelRef&gt; | |

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [cautious-journey](./cautious-journey.md) &gt; [FlagLabel](./cautious-journey.flaglabel.md) &gt; [requires](./cautious-journey.flaglabel.requires.md)
## FlagLabel.requires property
<b>Signature:</b>
```typescript
requires: Array<LabelRef>;
```

View File

@ -41,6 +41,8 @@ export interface BaseLabel extends ChangeSet {
* Label priority.
*/
priority: number;
requires: Array<LabelRef>;
}
/**

View File

@ -39,13 +39,17 @@ describe('label helpers', () => {
requires: [],
}];
const states = [{
adds: [],
name: 'foo',
priority: 1,
removes: [],
requires: [],
values,
}, {
adds: [],
name: 'bar',
priority: 1,
removes: [],
requires: [],
values,
}];
@ -61,13 +65,17 @@ describe('label helpers', () => {
describe('prioritize labels helper', () => {
it('should sort by priority', () => {
const HIGH_LABEL = {
adds: [],
name: 'high',
priority: 5,
removes: [],
requires: [],
};
const LOW_LABEL = {
adds: [],
name: 'low',
priority: 1,
removes: [],
requires: [],
};
@ -77,13 +85,17 @@ describe('label helpers', () => {
it('should sort by name when priority is equal', () => {
const FIRST_LABEL = {
adds: [],
name: 'label-a',
priority: 1,
removes: [],
requires: [],
};
const SECOND_LABEL = {
adds: [],
name: 'label-b',
priority: 1,
removes: [],
requires: [],
};
@ -95,9 +107,12 @@ describe('label helpers', () => {
describe('label color helper', () => {
it('should return the value color', () => {
expect(getLabelColor(['test'], alea(), {
adds: [],
color: 'beans',
name: '',
priority: 1,
removes: [],
requires: [],
values: [],
}, {
adds: [],
@ -106,14 +121,18 @@ describe('label helpers', () => {
name: '',
priority: 1,
removes: [],
requires: [],
})).to.equal('not');
});
it('should return the state color when value color is unset', () => {
expect(getLabelColor(['test'], alea(), {
adds: [],
color: 'beans',
name: '',
priority: 1,
removes: [],
requires: [],
values: [],
}, {
adds: [],
@ -122,6 +141,7 @@ describe('label helpers', () => {
name: '',
priority: 1,
removes: [],
requires: [],
})).to.equal('beans');
});