Skip to content

Instantly share code, notes, and snippets.

@crguezl
Last active April 23, 2016 19:01
Show Gist options
  • Save crguezl/cafeb39eafd8b7e18a2507400cb51590 to your computer and use it in GitHub Desktop.
Save crguezl/cafeb39eafd8b7e18a2507400cb51590 to your computer and use it in GitHub Desktop.
conducta extraña en gitbook-plugin?

Que pasa?

Se observan varias conductas anómalas o bugs en este ejemplo.

  • El markdown no parece funcionar en la parte del enunciado.
  • Quiero hacer la ventana de entrada del editor mas grande y no lo consigo
  • Creo que la regexp debería funcionar sobre la solución y está fracasando!.
    • Parece que cuando hago click en el botón solution la solución está TRUNCADA!!!

Ejercicio

Escriba en la ventana de edición el código de las pruebas con chai, incluyendo las partes que faltan en esta sugerencia.

          var assert = chai.______;

          suite('temperature', function() {
              test('[1,{a: 2}] == [1,{a: 2}]', function() {
                assert._________([1, {a:2}], [1, {a:2}]);
              });
              test('5X = error', function() {
                  original.value = "5X";
                  calculate();
                  assert._____(converted.innerHTML, /ERROR/);
              });
          });

{% regexp height="70%", width="80%", gutter="true" %}

Escriba en la ventana de edición el código de las pruebas con chai, incluyendo las partes que faltan en esta sugerencia.

          var assert = chai.______;

          suite('temperature', function() {
              test('[1,{a: 2}] == [1,{a: 2}]', function() {
                assert._________([1, {a:2}], [1, {a:2}]);
              });
              test('5X = error', function() {
                  original.value = "5X";
                  calculate();
                  assert._____(converted.innerHTML, /ERROR/);
              });
          });

{% solution %} var assert = chai.assert;

  suite('temperature', function() {
      test('[1,{a: 2}] == [1,{a: 2}]', function() {
        assert.deepEqual([1, {a:2}], [1, {a:2}]);
      });
      test('5X = error', function() {
          original.value = "5X";
          calculate();
          assert.match(converted.innerHTML, /ERROR/);
      });
  });

{% validation %} /chai.assert(.|\n)+deepEqual(.|\n)+match(.|\n)+/ {% endregexp %}

{
"plugins": [
"jazer"
],
"pluginsConfig": {
"toc": {
"addClass": "true",
"className": "toc"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment