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

ci(): add source-map-support for testing #8248

Merged
merged 1 commit into from Sep 11, 2022
Merged

Conversation

ShaMan123
Copy link
Contributor

@ShaMan123 ShaMan123 commented Sep 4, 2022

Added source map to errors when testing.
Rollup outputs a build warning that seems a false positive.
https://github.com/evanw/node-source-map-support#source-map-support

See outputs after I inserted an error at src/mixins/canvas_events.mixin.ts:727

## browser
not ok 95 Chrome 105.0 - [4 ms] - fabric.Canvas events mixin: A transform will call mouseup and mousedown on the control
    ---
        actual: >
            null
        stack: >
            Error: bip
                at klass._handleEvent (http://localhost:8080/586986970993100/src/mixins/canvas_events.mixin.ts:727:15)
                at klass.__onMouseUp (http://localhost:8080/586986970993100/src/mixins/canvas_events.mixin.ts:662:12)
                at Object.<anonymous> (http://localhost:8080/586986970993100/test/unit/canvas_events.js:428:12)
                at runTest (http://localhost:8080/node_modules/qunit/qunit/qunit.js:2959:35)
                at Test.run (http://localhost:8080/node_modules/qunit/qunit/qunit.js:2942:9)
                at http://localhost:8080/node_modules/qunit/qunit/qunit.js:3233:16
                at processTaskQueue (http://localhost:8080/node_modules/qunit/qunit/qunit.js:2504:26)
                at http://localhost:8080/node_modules/qunit/qunit/qunit.js:2508:13
        message: >
            Died on test #1: bip
                at Object.test (http://localhost:8080/node_modules/qunit/qunit/qunit.js:3624:5)
                at http://localhost:8080/586986970993100/test/unit/canvas_events.js:407:9
                at http://localhost:8080/586986970993100/test/unit/canvas_events.js:1151:3
        negative: >
            false
        browser log: |
    ...
## node
not ok 217 fabric.Canvas events mixin > mouse:up isClick = true
  ---
  message: |+
    Died on test #1: bip
        at Object.test (C:\Users\DELL\Desktop\DEV\fabric.js\node_modules\qunit\qunit\qunit.js:3624:5)
        at C:\Users\DELL\Desktop\DEV\fabric.js\test\unit\canvas_events.js:296:9
        at Object.<anonymous> (C:\Users\DELL\Desktop\DEV\fabric.js\test\unit\canvas_events.js:1151:3)
        at Module._compile (node:internal/modules/cjs/loader:1103:14)
        at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
        at Module.load (node:internal/modules/cjs/loader:981:32)
        at Function.Module._load (node:internal/modules/cjs/loader:822:12)
        at Module.require (node:internal/modules/cjs/loader:1005:19)
  severity: failed
  actual  : null
  expected: undefined
  stack: |
    Error: bip
        at klass._handleEvent (C:\Users\DELL\Desktop\DEV\fabric.js\src\mixins\canvas_events.mixin.ts:727:15)
        at klass.__onMouseUp (C:\Users\DELL\Desktop\DEV\fabric.js\src\mixins\canvas_events.mixin.ts:662:12)
        at Object.<anonymous> (C:\Users\DELL\Desktop\DEV\fabric.js\test\unit\canvas_events.js:303:12)
        at runTest (C:\Users\DELL\Desktop\DEV\fabric.js\node_modules\qunit\qunit\qunit.js:2959:35)
        at Test.run (C:\Users\DELL\Desktop\DEV\fabric.js\node_modules\qunit\qunit\qunit.js:2942:9)
        at C:\Users\DELL\Desktop\DEV\fabric.js\node_modules\qunit\qunit\qunit.js:3233:16
        at processTaskQueue (C:\Users\DELL\Desktop\DEV\fabric.js\node_modules\qunit\qunit\qunit.js:2504:26)
        at C:\Users\DELL\Desktop\DEV\fabric.js\node_modules\qunit\qunit\qunit.js:2508:13
  ...

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2022

Coverage after merging source-map-support into master will be

81.97%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
HEADER.js56%48.15%0%68.18%13, 17, 17, 17, 17, 17–18, 21, 21–22, 22, 22, 22, 22–23, 26, 28–29, 86, 86, 86
src
   cache.ts97.06%90%100%100%43
   canvas.class.ts93.47%90.29%94.23%95.72%1016, 1016, 1050, 1083–1084, 1112–1113, 1144, 1152, 1261–1262, 1264–1265, 1285–1286, 1415–1416, 1425, 1429, 481–482, 488, 496, 615–616, 664–665, 727–728, 731, 733, 770–772, 805, 810–811, 835–836, 993, 993–994, 997
   config.ts56.82%11.11%55.56%73.08%133, 140–142, 151–152, 152, 152, 152, 152, 152, 152–154, 156
   constants.ts100%100%100%100%
   intersection.class.ts100%100%100%100%
   pattern.class.ts82.29%72.50%100%87.50%109, 128, 131, 131, 131–132, 163–164, 169–170, 172–173, 196, 67, 86, 86–87
   point.class.ts100%100%100%100%
   shadow.class.ts95.71%90%100%100%144, 193, 8
   static_canvas.class.ts88.04%80.89%96.59%90.93%1080–1081, 1081, 1081–1082, 1200, 1250–1251, 1255, 1288–1289, 1367, 1373, 1377, 1402–1403, 1431–1432, 1464–1465, 1502–1503, 1506, 1508, 1508, 1508, 1508, 1512, 1512, 1512–1514, 1537–1538, 1575–1576, 1579, 1581, 1581, 1581, 1581, 1585, 1585, 1585–1587, 1626, 1626–1627, 1630, 1630–1631, 1683, 1685, 1685, 1685, 1685, 1685–1686, 1689–1690, 1690, 1690–1691, 1694, 1694, 1694, 1697, 1700, 1706, 1708–1709, 1709, 1709, 1712–1713, 1713, 1713, 1716, 266–267, 269–270, 272–273, 286–287, 289–290, 587, 607, 661–664, 777, 777–778, 823, 843–845, 845, 845–846, 848–849
src/brushes
   base_brush.class.ts100%100%100%100%
   circle_brush.class.ts3.03%0%0%4%104–105, 107, 109–111, 120, 120, 120, 122, 124, 126–128, 130–133, 141, 150, 152, 30, 35–36, 44–48, 52–56, 63–66, 74–77, 79, 87, 87, 87, 87, 87–88, 90, 90, 90–93, 96
   pattern_brush.class.ts5.26%0%0%8.33%18, 23–26, 28–29, 29, 29–34, 36, 40, 48, 48, 48, 56–58, 58, 58, 65–66, 68–69, 69, 73
   pencil_brush.class.ts91.76%85.42%100%93.46%122–123, 149, 149–151, 268, 272, 277–278, 73–74, 89–90
   spray_brush.class.ts2.30%0%0%3.08%105–107, 109–110, 118, 118, 118, 118, 118–119, 121–122, 129–130, 132, 134–138, 147, 151, 151, 151, 157, 157, 157–160, 162–165, 169–170, 172, 174–177, 180, 187–188, 190, 192–193, 195, 202–203, 205–206, 209, 209, 215, 215, 219, 27–28, 30–32, 32, 32–34, 38, 48, 55, 62, 69, 76, 83, 95–97
src/color
   color.class.ts91.58%84.51%100%94.34%325–326, 330–331, 334–335, 45, 51, 77–78, 78, 80, 80, 80–81, 83–84
   color_map.ts100%100%100%100%
   constants.ts100%100%100%100%
   index.ts100%100%100%100%
   util.ts100%100%100%100%
src/controls
   control.class.ts90.24%81.48%86.67%97.50%213, 289, 289, 331, 342, 8
   controls.actions.ts76.38%69.20%93.75%80.07%148, 150, 150, 150, 152, 154, 20, 20, 20, 262–265, 283, 285, 293–294, 296, 296–297, 299–300, 304, 326, 328, 336–337, 339, 339–340, 342–343, 347, 372–373, 375, 377, 383, 387, 387, 387–388, 388, 388, 390, 390, 390–391, 391, 391, 394, 394, 394–395, 395, 395, 422–423, 425, 427, 433, 437, 437, 437–438, 438, 438, 440, 440, 440–441, 441, 441, 444, 444, 444–445, 445, 445, 45, 466–468, 470, 470, 470–471, 474–477, 479, 479, 479–481, 481, 481–483, 485, 485, 485–486, 488, 488, 488–489, 494, 494, 494–495, 497, 499–501, 525–526, 528–530, 571–573, 746, 8
   controls.render.ts84.95%84.78%100%84.44%17, 20, 30–33, 35–38, 48–49, 66, 69
   default_controls.ts94.12%50%100%100%115, 83
src/filters
   2d_backend.class.ts96.15%83.33%100%100%63
   WebGLProbe.ts61.54%80%57.14%54.55%38–39, 49–53, 66–69, 75
   base_filter.class.ts28.49%31.82%36.36%25.47%100, 107–111, 111, 111–112, 119–120, 120, 120–123, 138, 154, 164–169, 173–174, 174, 174–177, 177, 177, 177, 177–179, 181, 186–187, 192–196, 241–244, 258, 258, 258–259, 261, 277–279, 279, 279, 279, 279–280, 283, 285–286, 288–289, 291–293, 297–298, 300, 304–306, 310, 314, 334, 334, 334–338, 373, 77, 77,

@ShaMan123 ShaMan123 changed the title ci(): add source-map-support for testing ci(): add source-map-support for testing Sep 4, 2022
@asturur
Copy link
Member

asturur commented Sep 11, 2022

ok this is great, it updates also the coverage report.

@asturur asturur merged commit b70d7a0 into master Sep 11, 2022
@ShaMan123 ShaMan123 deleted the source-map-support branch September 11, 2022 23:28
frankrousseau pushed a commit to cgwire/fabric.js that referenced this pull request Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants