Skip to content

Instantly share code, notes, and snippets.

@zivce
Created May 26, 2020 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zivce/b845ac03fd49210765f6c803d65c6bf9 to your computer and use it in GitHub Desktop.
Save zivce/b845ac03fd49210765f6c803d65c6bf9 to your computer and use it in GitHub Desktop.
Simple test for resolving csv
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