dwyl/learn-tdd

Outdated version of QUnit

RhodesPeter opened this issue ยท 5 comments

According to the QUnit documentation the current way to run a test is like this:

QUnit.test('This sample test should always pass!', function(assert) {
        var result = 1 + 1;
        assert.equal(result, 2); // just so we know everything loaded ok
      });

As opposed to this:

 test('This sample test should always pass!', function(assert) {
        var result = 1 + 1;
        assert.equal(result, 2); // just so we know everything loaded ok
      });

Could we update the QUnit script from this (QUnit 1.18.0):

<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-1.18.0.css">

to this (QUnit 2.1.1):

<script src="https://code.jquery.com/qunit/qunit-2.1.1.js"></script>

The examples would also need to be changed.

@RhodesPeter I think the reason QUnit is out-of-date was a "Blanket" compatibility issue, please confirm the latest QUnit works with the latest Blanket.js then update with a PR. thanks! ๐Ÿ‘

Update:

  • I can't find any documentation that clearly states the latest working version of QUnit for Blanket.js.
  • The example tests on the blanket.js GitHub repo use an older version of QUnit.
  • The QUnit version that Blanket.js is using hasn't been updated in 3 years, so I am fairly confident that compatibility is still an issue. qunit version updated

Feel free to close the issue.

@RhodesPeter it might be useful to add a comment to the code informing others why we are using an "out-dated" version of QUnit (i.e. still worth a PR...)

Ok no problem @nelsonic. I will put this together now ๐Ÿ˜€

Comment on version of QUnit added by @RhodesPeter ๐ŸŽ‰
closing. โœ