fix: prevent Opal from being loaded twice in tests#2
Merged
Conversation
Added explicit Opal.load calls for 'opal-parser', 'parser', and 'parser/ruby31' to ensure Opal.Parser.Ruby31 is available. This fixes the issue where RubyParser was undefined during unit tests. 🤖 Generated with [Gemini Code](https://gemini.google.com/code) Co-Authored-By: Gemini <noreply@google.com>
Migrated components, containers, reducers, and libraries for: - Opal integration and Ruby-to-Blocks converter - Custom modals (Mesh, Koshien, Block Display, etc.) - Ruby tab and snippets - Build scripts and post-processing 🤖 Generated with [Gemini Code](https://gemini.google.com/code) Co-Authored-By: Gemini <noreply@google.com>
- Modified ruby-parser.js to only require Opal if not already defined. - Added safer check for both global.Opal and window.Opal. - This eliminates the large JavaScript dump in Jest outputs. - Updated ruby-to-blocks-converter/index.js to remove redundant require calls.
- Fix 'Unexpected this' in ruby-to-blocks-converter - Fix 'intlShape not found' in url-loader-hoc.jsx - Remove unused 'opalParserConfig' in webpack.config.js - Prefix unused variables/props with '_' - Update ESLint config to ignore '_' prefixed arguments 🤖 Generated with [Gemini Code](https://gemini.google.com/code) Co-Authored-By: Gemini <noreply@google.com>
34a53b2 to
9bb0982
Compare
- Migrated integration and unit tests from smalruby3-gui - Migrated extension-filter reducer and CSS - Migrated ADRs and Google Drive setup docs - Updated test paths for themes and menu XPaths 🤖 Generated with [Gemini Code](https://gemini.google.com/code) Co-Authored-By: Gemini <noreply@google.com>
takaokouji
pushed a commit
that referenced
this pull request
Mar 8, 2026
…extensions toolbox categories (#2)
takaokouji
added a commit
that referenced
this pull request
Apr 12, 2026
- Add next-steps guidance after student joins classroom (#1) - Add submit hint for students who haven't submitted yet (#2) - Add STAGE !== 'prod' failsafe for DEV_BYPASS_TOKEN (#3) - Add fullscreen tooltip to join code expand button (#4) - Improve member grid prompt to clarify clickable seats (#5) - Remove window._classroomIdToken debug variable (#8) Closes #495 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9 tasks
takaokouji
added a commit
that referenced
this pull request
Apr 18, 2026
Map "Jimmy" * 5 to stringMethod block with METHOD=*. Generator emits infix notation (receiver * arg) instead of dot notation. finishTargets regex handles * operator inlining. Handle numeric arguments with _addNumberInput instead of _addTextInput to avoid type mismatch. Refs #524 (Phase 1 #2) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses an issue where Jest test outputs were being flooded with a massive JavaScript source dump from the minified Opal library.
The root cause was that Opal was being initialized multiple times (once in a Jest setup file and again in
ruby-parser.js), which triggered Opal's internal "already loaded" warning. Jest then attempted to display the context of this warning, resulting in the dump.Changes
src/lib/ruby-parser.jsto onlyrequire('opal')andrequire('opal-parser')ifOpalis not already defined in the global or window scope.src/lib/ruby-to-blocks-converter/index.jsto remove redundantrequirecalls, favoring the initialization inruby-parser.js.index.jsto ensureOpalis initialized before proceeding.Verification
npm exec jest test/unit/lib/ruby-to-blocks-converter/ruby.test.js