Initial commit
This commit is contained in:
commit
b3a51a4115
10336 changed files with 2381973 additions and 0 deletions
21
node_modules/fast-check/lib/esm/check/model/commands/CommandsIterable.js
generated
vendored
Normal file
21
node_modules/fast-check/lib/esm/check/model/commands/CommandsIterable.js
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { cloneMethod } from '../../symbols.js';
|
||||
export class CommandsIterable {
|
||||
constructor(commands, metadataForReplay) {
|
||||
this.commands = commands;
|
||||
this.metadataForReplay = metadataForReplay;
|
||||
}
|
||||
[Symbol.iterator]() {
|
||||
return this.commands[Symbol.iterator]();
|
||||
}
|
||||
[cloneMethod]() {
|
||||
return new CommandsIterable(this.commands.map((c) => c.clone()), this.metadataForReplay);
|
||||
}
|
||||
toString() {
|
||||
const serializedCommands = this.commands
|
||||
.filter((c) => c.hasRan)
|
||||
.map((c) => c.toString())
|
||||
.join(',');
|
||||
const metadata = this.metadataForReplay();
|
||||
return metadata.length !== 0 ? `${serializedCommands} /*${metadata}*/` : serializedCommands;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue