mirror of
https://github.com/nasa/openmct.git
synced 2024-12-23 15:02:23 +00:00
[CSV Export] Test with specified filename
This commit is contained in:
parent
c4d5643ea7
commit
c07dc0ea8b
@ -119,6 +119,25 @@ define(
|
||||
});
|
||||
});
|
||||
|
||||
describe("#exportCSV(rows, options.filename)", function () {
|
||||
var testFilename;
|
||||
|
||||
beforeEach(function () {
|
||||
testFilename = "some-test-filename.csv";
|
||||
exportService
|
||||
.exportCSV(testRows, { filename: testFilename });
|
||||
waitsFor(finishedReadingCSV);
|
||||
});
|
||||
|
||||
it("saves a file with the specified name", function () {
|
||||
expect(mockSaveAs).toHaveBeenCalledWith(
|
||||
jasmine.any(Blob),
|
||||
testFilename
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user