-
Notifications
You must be signed in to change notification settings - Fork 780
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
assert should not be a global #341
Labels
Comments
Krinkle
added a commit
that referenced
this issue
Oct 10, 2013
Order is mostly preserved, a few changed had to be made (otherwise we had to create a core-before.js and core-after.js) - Prototype split This used to be in the middle after Test and Assert. It is now right after QUnit is first defined. So instead of things becoming globals depending on whether they're before or after the prototype split, they now become globals depending on whether they use QUnit or QUnit.constructor.prototype (some parts of the code used this already). Removed the, now redundant, comment about the order in assert.js (issue #341) - Test Was close to the top inside core, this is now in its own modudle after core. No side effects (constructor is still hoisted, prototype now assigned later, neither is used until the load event). - Assert Was close to the top inside core, this is now in its own module after core and Test. Removed the `assert` property from the `extend(QUnit, { .. })` in core because that now too early (assert is undefined). Moved the assignment to assert.js - Export Due to the reliance on position of the prototype split, the export for browser globals was somewhere in the middle and the one for CommonJS modules on the bottom. They are now both at the bottom. Build process: - Based on the build process of jQuery and jQuery UI. Clean up: - gitignore: Alphabetized. - gitignore: 'dist/' was already in there apparently, removed redundant slash (matching jQuery). - package.json: Match order of properties with jQuery. - package.json: Removed 'contributors' property. - grunt: Removed old build-git task, like jquery, we don't include the git hash. Instead we have 'pre' in the version and an exact timestamp. - src: Simplified file headers to be more like jQuery and made them match between js and css.
Krinkle
added a commit
that referenced
this issue
Oct 10, 2013
Order is mostly preserved, a few changed had to be made (otherwise we had to create a core-before.js and core-after.js) - Prototype split This used to be in the middle after Test and Assert. It is now right after QUnit is first defined. So instead of things becoming globals depending on whether they're before or after the prototype split, they now become globals depending on whether they use QUnit or QUnit.constructor.prototype (some parts of the code used this already). Removed the, now redundant, comment about the order in assert.js (issue #341) - Test Was close to the top inside core, this is now in its own modudle after core. No side effects (constructor is still hoisted, prototype now assigned later, neither is used until the load event). - Assert Was close to the top inside core, this is now in its own module after core and Test. Removed the `assert` property from the `extend(QUnit, { .. })` in core because that now too early (assert is undefined). Moved the assignment to assert.js - Export Due to the reliance on position of the prototype split, the export for browser globals was somewhere in the middle and the one for CommonJS modules on the bottom. They are now both at the bottom. Build process: - Based on the build process of jQuery and jQuery UI. Clean up: - gitignore: Alphabetized. - gitignore: 'dist/' was already in there apparently, removed redundant slash (matching jQuery). - package.json: Match order of properties with jQuery. - package.json: Removed 'contributors' property. - grunt: Removed old build-git task, like jquery, we don't include the git hash. Instead we have 'pre' in the version and an exact timestamp. - src: Simplified file headers to be more like jQuery and made them match between js and css. Fixes #378.
Krinkle
added a commit
that referenced
this issue
Oct 10, 2013
Order is mostly preserved, a few changed had to be made (otherwise we had to create a core-before.js and core-after.js) - Prototype split This used to be in the middle after Test and Assert. It is now right after QUnit is first defined. So instead of things becoming globals depending on whether they're before or after the prototype split, they now become globals depending on whether they use QUnit or QUnit.constructor.prototype (some parts of the code used this already). Removed the, now redundant, comment about the order in assert.js (issue #341) - Test Was close to the top inside core, this is now in its own modudle after core. No side effects (constructor is still hoisted, prototype now assigned later, neither is used until the load event). - Assert Was close to the top inside core, this is now in its own module after core and Test. Removed the `assert` property from the `extend(QUnit, { .. })` in core because that now too early (assert is undefined). Moved the assignment to assert.js - Export Due to the reliance on position of the prototype split, the export for browser globals was somewhere in the middle and the one for CommonJS modules on the bottom. They are now both at the bottom. Build process: - Based on the build process of jQuery and jQuery UI. Clean up: - gitignore: Alphabetized. - gitignore: 'dist/' was already in there apparently, removed redundant slash (matching jQuery). - package.json: Match order of properties with jQuery. - package.json: Removed 'contributors' property. - grunt: Removed old build-git task, like jquery, we don't include the git hash. Instead we have 'pre' in the version and an exact timestamp. - src: Simplified file headers to be more like jQuery and made them match between js and css. Fixes #378.
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
9491c02 refactored assertion helpers from
QUnit.*
intoQUnit.assert.*
passed as local variable in theQUnit.test
callback.But since it puts itself on
QUnit
before the extension of window, it itself became a global variable as well.The text was updated successfully, but these errors were encountered: