mirror of
https://github.com/nasa/openmct.git
synced 2025-06-01 23:20:50 +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…
x
Reference in New Issue
Block a user