mirror of
https://github.com/xodio/xod.git
synced 2026-03-25 10:06:55 +01:00
fix(xod-project): add one more case for migrating bound pulse values into new literals
This commit is contained in:
committed by
Victor Nakoryakov
parent
9b33d68dfa
commit
ec3fc3b371
@@ -26,7 +26,7 @@ export const ensureLiteral = def(
|
||||
case PIN_TYPE.PULSE:
|
||||
return R.compose(
|
||||
R.when(
|
||||
R.equals(false),
|
||||
R.either(R.equals(false), R.equals('false')),
|
||||
R.always(INPUT_PULSE_PIN_BINDING_OPTIONS.NEVER)
|
||||
),
|
||||
R.when(
|
||||
|
||||
@@ -73,6 +73,12 @@ describe('Legacy', () => {
|
||||
ensureLiteral(PIN_TYPE.PULSE, false),
|
||||
'Never'
|
||||
);
|
||||
// Sometimes Never was a string "false"
|
||||
// when User binds `Never` to terminal in the Inspector
|
||||
assert.strictEqualJustValue(
|
||||
ensureLiteral(PIN_TYPE.PULSE, 'false'),
|
||||
'Never'
|
||||
);
|
||||
assert.strictEqualJustValue(
|
||||
ensureLiteral(PIN_TYPE.PULSE, 'NEVER'),
|
||||
'Never'
|
||||
|
||||
Reference in New Issue
Block a user