Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update QUnit and tests #1964

Merged
merged 2 commits into from
Jan 9, 2023
Merged

Update QUnit and tests #1964

merged 2 commits into from
Jan 9, 2023

Conversation

MSNev
Copy link
Collaborator

@MSNev MSNev commented Dec 16, 2022

  • Update minify script to use PC newline for imports and header banners

@@ -5,13 +5,13 @@
<meta charset="utf-8">
<meta http-equiv="Cache-control" content="no-Cache" />
<title>Tests for Application Insights JavaScript AISKU</title>
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-1.23.1.css">
<link rel="stylesheet" href="../../../common/Tests/External/qunit-2.9.3.css">
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Most of the changes in this PR are from my investigations to "fix" the GitHub test runs.
This is updating to the current version of GitHub and requireJs -- which did break the CDN Packaging tests because of how they now load and run modules.

@@ -133,38 +137,131 @@ export class CdnPackagingChecks extends AITestClass {
// Remove any "exports"
exports = {};

// Used to simulate loading a cjs module
let cjsModule = this["_cjsModule"] = {};
// Used to simulate globals without overriding them
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixing the tests that where broken by the qunit and requirejs updates. But this also provided the ability to more fully tests the different initialization options

"// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" +
"// Note: DON'T Export these const from the package as we are still targeting ES3 this will export a mutable variables that someone could change!!!\n" +
"// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n";
"// Copyright (c) Microsoft Corporation. All rights reserved.\r\n" +
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This fixes the issues where once building you end up with files that "look" like they have changed.

It turns out that the issue was related to the different new line (\r\n) that the files are defaulted to and that this script was only creating the files with "\n"

@MSNev MSNev force-pushed the MSNev/UpdateComponents branch 5 times, most recently from e9770ae to 7f8f8c1 Compare December 17, 2022 00:48
@MSNev MSNev merged commit 389b73a into master Jan 9, 2023
@MSNev MSNev added this to the 2.8.10 milestone Jan 31, 2023
@MSNev MSNev deleted the MSNev/UpdateComponents branch April 6, 2023 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants