Created
May 26, 2020 16:11
-
-
Save zivce/b845ac03fd49210765f6c803d65c6bf9 to your computer and use it in GitHub Desktop.
Simple test for resolving csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let assert = require('assert') | |
let CSVImageDownloader = require("./index"); | |
const fs = require('fs'); | |
const path = require('path') | |
describe("CSV Image Downloader", function () { | |
const VALID_FILE = 'data.csv' | |
const INVALID_FILE = 'data2.csv' | |
const VALID_COLUMN = 'IMAGE' | |
let columnValues = [] | |
it("should resolve data csv", function () { | |
let result = CSVImageDownloader.readCSV(VALID_FILE); | |
assert.doesNotReject(result); | |
}) | |
it("should reject when file doesn't exist", function () { | |
let result = CSVImageDownloader.readCSV(INVALID_FILE) | |
assert.rejects(result) | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment