Skip to content

Commit

Permalink
Testing support added in commits:
Browse files Browse the repository at this point in the history
1. Final Tests added
2. modified main.swift to support if argument is empty
3. Added information for testing in Contributing.md
4. removed Testing files & .gitignore
5. Added ModernSSGUnitTesting
6. Changed Package version & added files
  • Loading branch information
japneetsingh035 committed Nov 13, 2021
1 parent 5f0583e commit 6b87fca
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Tests/ModernSSGTests/ModernSSGTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ final class ModernSSGTests: XCTestCase {
let output = String(data: data, encoding: .utf8)

XCTAssertEqual(output, "")
// do {
// let storedText = "<!doctype html><html lang =\(lang ?? "en-CA")><head><LINK rel='stylesheet' href=\(stylesheet ?? " ")><meta charset='utf-8'><title>\(input)</title><meta name='viewport' content='width=device-width,initial-scale=1'></head><body><h1>\(input)</h1><img src=\(image ?? "") alt = 'image-alt'>\(input)</body></html>"
// let filePath = FileManager.default.currentDirectoryPath + "/Dist/\(input).html"
// if FileManager.default.createFile(atPath: filePath, contents: nil, attributes: nil) {
// try storedText.write(toFile: filePath, atomically: false, encoding: .utf8)
// print("File Created at \(filePath)")
// } else {
// print("Error in writing data! Please create folder in current directory")
// }
// }
// catch { print("Error in reading folder. *** Folder must be in current directory ***") }
// }
//}
#endif
}

Expand Down

0 comments on commit 6b87fca

Please sign in to comment.