Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

add testing of all json file, linting of main js and gulp as test #30

Merged
merged 4 commits into from
Oct 3, 2016

Conversation

butlerx
Copy link
Member

@butlerx butlerx commented Oct 2, 2016

for #26

@butlerx butlerx force-pushed the enhanchment/testing branch from 9ae1a21 to 4f55e7a Compare October 2, 2016 12:34
Copy link
Contributor

@SeanHealy33 SeanHealy33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 💃

@butlerx butlerx force-pushed the enhanchment/testing branch from 4f55e7a to b84f676 Compare October 2, 2016 16:36
JSON.parse(fs.readFileSync(filename, "utf8"));
console.log("Look good");
JSON.parse(fs.readFileSync(filename, 'utf8'));
console.log(filename + ' look good');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/look/looks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@butlerx ping on this before I approve

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solved

if(file !== undefined && file !== null) {
checkJson(file);
} else {
for(var i of ['events.json', '2015/events.json', '2016/events.json']) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't hardcode the years in. Also, replace var with let?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since they arnt modified in the loop it should prob be const
also suggestion where too put the array or form it im not a big fan of adding for json files.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we decide to migrate historic data it would grow a bit. We can move the 2015 and 2016 into a new directory years, and iterate over every year we find there

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep sounds like a plan

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ive opened issue #31 to do with the migration part as an idea

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, cool

var ul = day.day+'-events';
var de = $('<li><div id="'+day.day+'" class="collapsible-header container day"><h5 class="day__title" data-position="right"><span class="day__title__bold">' + day.day + '</span> - ' + day.description + '</h5></div><div class="collapsible-body"><ul id="'+ul+'"class="collapsible sub-collapsible" data-collepsible="accordion"></div></ul>').appendTo(ce);
var ul = day.day + '-events';
var de = $('<li><div id="' + day.day + '" class="collapsible-header container day"><h5 class="day__title" data-position="right"><span class="day__title__bold">' + day.day + '</span> - ' + day.description + '</h5></div><div class="collapsible-body"><ul id="'+ul+'"class="collapsible sub-collapsible" data-collepsible="accordion"></div></ul>');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realise this line was long before, but maybe split it to make it less terrible?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cant breaks minifaction

@butlerx butlerx force-pushed the enhanchment/testing branch from b84f676 to 7491d2e Compare October 3, 2016 07:44
@butlerx butlerx force-pushed the enhanchment/testing branch from 84c9a19 to 72553e7 Compare October 3, 2016 12:47
@butlerx butlerx merged commit 994322e into master Oct 3, 2016
@butlerx butlerx deleted the enhanchment/testing branch October 3, 2016 15:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants