Merge branch 'staging' of github.com:FreeCodeCamp/freecodecamp into staging
This commit is contained in:
@ -11,7 +11,7 @@
|
|||||||
"prestart-production": "bower cache clean && bower install && gulp build && npm run build-production",
|
"prestart-production": "bower cache clean && bower install && gulp build && npm run build-production",
|
||||||
"start-production": "node pm2Start",
|
"start-production": "node pm2Start",
|
||||||
"lint": "eslint --ext=.js,.jsx .",
|
"lint": "eslint --ext=.js,.jsx .",
|
||||||
"test": "mocha"
|
"test": "mocha --compilers js:babel/register"
|
||||||
},
|
},
|
||||||
"license": "(BSD-3-Clause AND CC-BY-SA-4.0)",
|
"license": "(BSD-3-Clause AND CC-BY-SA-4.0)",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
|
@ -742,6 +742,11 @@ form.code span {
|
|||||||
width: 99%;
|
width: 99%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scroll-locker {
|
||||||
|
overflow-x: auto;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
.big-error-icon {
|
.big-error-icon {
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
color: @brand-danger;
|
color: @brand-danger;
|
||||||
|
@ -333,33 +333,28 @@ $(document).ready(function() {
|
|||||||
if(magiVal < 0){
|
if(magiVal < 0){
|
||||||
magiVal = 0;
|
magiVal = 0;
|
||||||
}
|
}
|
||||||
magiVal = $(window).height()-($('.navbar').height()+$('.footer').height());
|
|
||||||
if(magiVal < 0){
|
|
||||||
magiVal = 0;
|
|
||||||
}
|
|
||||||
$('.editorScrollDiv').css("height", (magiVal-85) + "px");
|
$('.editorScrollDiv').css("height", (magiVal-85) + "px");
|
||||||
}
|
}
|
||||||
magiVal = $(window).height()-($('.navbar').height()+$('.footer').height());
|
magiVal = $(window).height()-($('.navbar').height()+$('.footer').height());
|
||||||
if(magiVal < 0){
|
if(magiVal < 0){
|
||||||
magiVal = 0;
|
magiVal = 0;
|
||||||
}
|
}
|
||||||
$('.scroll-locker').css("min-height", $('.editorScrollDiv').height()).css("height",magiVal-85);
|
|
||||||
|
$('.scroll-locker').css("min-height", $('.editorScrollDiv').height()).css("height",magiVal-185);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('.editorScrollDiv').css("max-height", 500 + "px");
|
$('.editorScrollDiv').css("max-height", 500 + "px");
|
||||||
$('.scroll-locker').css('position', 'inherit').css('top', 'inherit').css('width', '100%').css('max-height', '85%').css('overflow-y', 'auto').css('overflow-x', 'hidden');
|
$('.scroll-locker').css('position', 'inherit').css('top', 'inherit').css('width', '100%').css('max-height', '85%');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($('.scroll-locker').offset()){
|
if ($('.scroll-locker').html()){
|
||||||
$(document).ready(function(){
|
|
||||||
lockTop();
|
lockTop();
|
||||||
$(window).on('resize', function(){
|
$(window).on('resize', function(){
|
||||||
lockTop();
|
lockTop();
|
||||||
});
|
});
|
||||||
$(window).scroll(function() {
|
$(window).on('scroll', function() {
|
||||||
lockTop();
|
lockTop();
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -450,7 +450,7 @@
|
|||||||
"Let's now go create a nested array called <code>myArray</code>."
|
"Let's now go create a nested array called <code>myArray</code>."
|
||||||
],
|
],
|
||||||
"tests":[
|
"tests":[
|
||||||
"assert((function(){if(typeof(myArray) !== 'undefined' && typeof(myArray) === 'object' && typeof(myArray[0]) !== 'undefined' && typeof(myArray[0]) === 'object' && editor.getValue().match(/\\[(.*)?\\[/g).length >= 1 && editor.getValue().match(/\\](.*)?\\]/g).length >= 1){return(true);}else{return(false);}})(), 'myArray should contain at least one array');"
|
"assert((function(){if(typeof(myArray) !== \"undefined\" && typeof(myArray) === \"object\" && typeof(myArray[0]) !== \"undefined\" && typeof(myArray[0]) === \"object\" && editor.getValue().match(/\\[\\s?\\[/g).length >= 1 && editor.getValue().match(/\\]\\s?\\]/g).length >= 1){return(true);}else{return(false);}})(), 'myArray should contain at least one array');"
|
||||||
],
|
],
|
||||||
"challengeSeed":[
|
"challengeSeed":[
|
||||||
"var ourArray = [[\"the universe\", \"everything\"], 42];",
|
"var ourArray = [[\"the universe\", \"everything\"], 42];",
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
var request = require('supertest');
|
var request = require('supertest');
|
||||||
var app = require('../server/server.js');
|
var app = require('../server/server.js');
|
||||||
|
|
||||||
describe('#ROUTES', function() {
|
describe('#ROUTES', function () {
|
||||||
|
|
||||||
describe('GET /', function () {
|
describe('GET /', function () {
|
||||||
it('should return 200 OK', function (done) {
|
it('should return 200 OK', (done) => {
|
||||||
request(app)
|
request(app)
|
||||||
.get('/')
|
.get('/')
|
||||||
.expect(200, done);
|
.expect(200, done);
|
||||||
@ -12,7 +12,7 @@ describe('#ROUTES', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('GET /signin', function () {
|
describe('GET /signin', function () {
|
||||||
it('should return 200 OK', function (done) {
|
it('should return 200 OK', (done) => {
|
||||||
request(app)
|
request(app)
|
||||||
.get('/signin')
|
.get('/signin')
|
||||||
.expect(200, done);
|
.expect(200, done);
|
||||||
@ -20,7 +20,7 @@ describe('#ROUTES', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('GET /email-signup', function () {
|
describe('GET /email-signup', function () {
|
||||||
it('should return 200 OK', function (done) {
|
it('should return 200 OK', (done) => {
|
||||||
request(app)
|
request(app)
|
||||||
.get('/email-signup')
|
.get('/email-signup')
|
||||||
.expect(200, done);
|
.expect(200, done);
|
||||||
@ -28,15 +28,15 @@ describe('#ROUTES', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('GET /random-url', function () {
|
describe('GET /random-url', function () {
|
||||||
it('should return 302', function (done) {
|
it('should return 302', (done) => {
|
||||||
request(app)
|
request(app)
|
||||||
.get('/reset')
|
.get('/reset')
|
||||||
.expect(302, done);
|
.expect(302, done);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Get /camperName', function () {
|
describe('GET /camperName', function () {
|
||||||
it('should return 200', function (done) {
|
it('should return 200', (done) => {
|
||||||
request(app)
|
request(app)
|
||||||
.get('/terakilobyte')
|
.get('/terakilobyte')
|
||||||
.expect(200, done);
|
.expect(200, done);
|
||||||
|
Reference in New Issue
Block a user