# typescript


11/25/2020, 10:25 PM
Is it possible to compare output values in Mocha+ChaiAsPromised tests? I use assertions like
return expect("Joanne.txt");
Is there a way to do something more like this?
Copy code
return => expect(`${username}.txt`));
Currently I'm using this but it seems excessively clunky:
Copy code
return expect(Promise.all([,
])).to.eventually.satisfy((names: Promise<string>[]) => names[0] == `${names[1]}.txt`, "User and file names don't match");
Plus there's no easy way to display the actual and expected values.. the message is outside the promise-resolution code, but the assertion is inside it...