Skip to content

Commit 0d12a53

Browse files
committed
adding testing fundamentals for the main app.
1 parent e88f5fc commit 0d12a53

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

spec/spec.with-sitemap.js

+14
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ describe('Crawler Sitemap Application', function () {
3838
expect(_fs.mkDir('test_directory')).to.be.fulfilled.notify(done);
3939
});
4040

41+
it('expect deletion of the test directory to pass', function(done) {
42+
expect(_fs.delDir('test_directory')).to.be.fulfilled.notify(done);
43+
});
4144
});
4245

4346
describe('Crawler Object', function() {
@@ -49,6 +52,17 @@ describe('Crawler Sitemap Application', function () {
4952
expect(crawler.init).to.not.throw(Error);
5053
});
5154

55+
it('Crawler has created a rendered_sitemaps directory', function(done) {
56+
expect(_fs.readDir('rendered_sitemaps')).to.be.fulfilled.notify(done);
57+
});
58+
59+
it('Crawler makes successful http GET request', function(done) {
60+
expect(crawler.httpGet('http://google.com')).to.be.fulfilled.notify(done);
61+
});
62+
63+
it('Crawler formats files from one extension to another', function() {
64+
expect(crawler.formatFile('random_sitemapindex.xml', 'csv')).to.equal('random_sitemapindex.csv');
65+
});
5266
});
5367

5468
});

0 commit comments

Comments
 (0)