Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Unit Tests Failing in Minified Build #8597

Open
redmunds opened this issue Jul 30, 2014 · 7 comments
Open

Unit Tests Failing in Minified Build #8597

redmunds opened this issue Jul 30, 2014 · 7 comments

Comments

@redmunds
Copy link
Contributor

While researching PR #7231 I noticed some unit tests failing in a minified build, and they're also failing in master. Most notably are all Extension Installation tests. There are some others, and some intermittent ones, so all tests should be checked.

Recipe

  1. Setup Grunt (one time only)
  2. Run grunt build in brackets repo
  3. Hold down Shift key when starting Brackets
  4. When prompted for index.html, use src/dist/index.html
  5. Debug > Run Tests

@jasonsanjose Is this a valid recipe?

@peterflynn
Copy link
Member

@redmunds Debug > Run Tests is supposed to be disabled in minified builds (see enableRunTestsMenuItem() in DebugCommands/main.js. A proper minified build should exclude the entire test folder... did a bug sneak in where that's not the case anymore?

@redmunds
Copy link
Contributor Author

This is not built with complete process on a build machine. I built it locally with steps provided. That's why I asked if the recipe was valid. Most all tests pass, so it seems valid. This may be a known issue due to differences in packaging, but I wanted to be sure this does indicate a lurking problem.

@peterflynn
Copy link
Member

Got it, that makes sense.

@dangoor
Copy link
Contributor

dangoor commented Jul 31, 2014

This does not appear to be a valid way to run tests. If you open the developer tools, you see this on the console:

[NodeDomain] Error loading domain "fileWatcher": Unable to load one of the modules: /Users/dangoor/projects/brackets/test/../src/filesystem/impls/appshell/node/FileWatcherDomain, reason: Command fileWatcher.watchPath already registered NodeDomain.js:146
[NodeDomain] Error loading domain "staticServer": Unable to load one of the modules: /Users/dangoor/projects/brackets/src/extensions/default/StaticServer/node/StaticServerDomain, reason: Command staticServer._setRequestFilterTimeout already registered NodeDomain.js:146
[Extensions] Failed to connect to node 
["Unable to load one of the modules: /Users/dangoor/…mand extensionManager.validate already registered"]
 Package.js:492

Also, when I run the extension installation tests on master (in isolation) they pass. Do you only see errors in extension installation tests when you run all tests, or when you run the isolated tests as well?

@redmunds
Copy link
Contributor Author

I see the same results for Extension Installation tests when I run All Unit tests or just the Extension Installation tests. They pass in normal dev environment, but fail in local minified build (as described above).

@dangoor
Copy link
Contributor

dangoor commented Aug 1, 2014

@redmunds Then I think we can close this, right? Or do we want to lower the priority of this and change the issue to "Make the test suite work in minified builds"?

@redmunds
Copy link
Contributor Author

redmunds commented Aug 1, 2014

Changed to Medium Priority. We should investigate to get an understanding of why they're failing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants