diff --git a/docs/helpers/FileSystem.md b/docs/helpers/FileSystem.md index c7dfa0df1..0af9843db 100644 --- a/docs/helpers/FileSystem.md +++ b/docs/helpers/FileSystem.md @@ -140,7 +140,7 @@ I.waitForFile('largeFilesName.txt', 10); // wait 10 seconds for file ### writeToFile -Writes test to file +Writes text to file #### Parameters diff --git a/lib/helper/FileSystem.js b/lib/helper/FileSystem.js index a7d3efb62..830936c7d 100644 --- a/lib/helper/FileSystem.js +++ b/lib/helper/FileSystem.js @@ -52,7 +52,7 @@ class FileSystem extends Helper { } /** - * Writes test to file + * Writes text to file * @param {string} name * @param {string} text */ diff --git a/test/unit/helper/FileSystem_test.js b/test/unit/helper/FileSystem_test.js index 912d5c027..6c2ead30e 100644 --- a/test/unit/helper/FileSystem_test.js +++ b/test/unit/helper/FileSystem_test.js @@ -43,4 +43,12 @@ describe('FileSystem', () => { for FileSystem helper test`); }); + + it('should write text to file', () => { + const outputFilePath = 'data/output/fs_output.txt'; + const text = '123'; + fs.writeToFile(outputFilePath, text); + fs.seeFile(outputFilePath); + fs.seeInThisFile(text); + }); });