Update test assertions for Live 10 Simplers' attack and release times
This commit is contained in:
@@ -232,6 +232,8 @@ test('serializes nested Live 10 Simplers without artificial empty Session clips'
|
|||||||
const rackTags = [...xml.matchAll(/<DrumGroupDevice\b[\s\S]*?<\/DrumGroupDevice>/g)].map(
|
const rackTags = [...xml.matchAll(/<DrumGroupDevice\b[\s\S]*?<\/DrumGroupDevice>/g)].map(
|
||||||
(match) => match[0],
|
(match) => match[0],
|
||||||
);
|
);
|
||||||
|
const expectedAttack = (200 / 255) * 1000;
|
||||||
|
const expectedRelease = (20 / 255) * 1000;
|
||||||
|
|
||||||
assert.ok(simplerTags.length > 0);
|
assert.ok(simplerTags.length > 0);
|
||||||
assert.ok(simplerTags.every((tag) => /\sId="\d+"/.test(tag)));
|
assert.ok(simplerTags.every((tag) => /\sId="\d+"/.test(tag)));
|
||||||
@@ -248,12 +250,16 @@ test('serializes nested Live 10 Simplers without artificial empty Session clips'
|
|||||||
);
|
);
|
||||||
assert.ok(
|
assert.ok(
|
||||||
simplerBlocks.every((simpler) =>
|
simplerBlocks.every((simpler) =>
|
||||||
/<Envelope>[\s\S]*?<AttackTime>[\s\S]*?<Manual Value="0.1"\s*\/>/.test(simpler),
|
new RegExp(
|
||||||
|
`<Envelope>[\\s\\S]*?<AttackTime>[\\s\\S]*?<Manual Value="${expectedAttack}"\\s*\\/>`,
|
||||||
|
).test(simpler),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
assert.ok(
|
assert.ok(
|
||||||
simplerBlocks.every((simpler) =>
|
simplerBlocks.every((simpler) =>
|
||||||
/<Envelope>[\s\S]*?<ReleaseTime>[\s\S]*?<Manual Value="50"\s*\/>/.test(simpler),
|
new RegExp(
|
||||||
|
`<Envelope>[\\s\\S]*?<ReleaseTime>[\\s\\S]*?<Manual Value="${expectedRelease}"\\s*\\/>`,
|
||||||
|
).test(simpler),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
assert.ok(rackTags.length > 0);
|
assert.ok(rackTags.length > 0);
|
||||||
@@ -266,6 +272,7 @@ test('serializes nested Live 10 Simplers without artificial empty Session clips'
|
|||||||
assert.doesNotMatch(xml, /<ReturnBranch\s/);
|
assert.doesNotMatch(xml, /<ReturnBranch\s/);
|
||||||
assert.doesNotMatch(xml, /<AudioBranchSendInfo\s/);
|
assert.doesNotMatch(xml, /<AudioBranchSendInfo\s/);
|
||||||
assert.doesNotMatch(xml, /Big Break Kit/);
|
assert.doesNotMatch(xml, /Big Break Kit/);
|
||||||
|
assert.doesNotMatch(xml, /<ClipEnvelope\b/);
|
||||||
} finally {
|
} finally {
|
||||||
await server.close();
|
await server.close();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user