V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
TangMonk
V2EX  ›  Node.js

mocha 一个怪异的问题

  •  
  •   TangMonk · Aug 30, 2014 · 3715 views
    This topic created in 4268 days ago, the information mentioned may be changed or developed.
    放代码不方便,我直接放 gif 了,很短。



    tag.js 加载不了 location.js 里的 hello()
    5 replies    2014-09-07 09:25:07 +08:00
    assassinpig
        1
    assassinpig  
       Aug 30, 2014   ❤️ 1
    把代码贴上好不?
    assassinpig
        2
    assassinpig  
       Aug 30, 2014   ❤️ 1
    exports.hello = hello;
    iwege
        3
    iwege  
       Aug 30, 2014   ❤️ 1
    1.20.1
    同样的代码,没有 debugger 使用`mocha tag.js` 跑, 没问题。
    TangMonk
        4
    TangMonk  
    OP
       Aug 31, 2014
    谢谢各位, 我知道怎么回事了
    是Cycles dependent 的问题

    tag.js -> location.js

    location.js -> tag.js
    fritx
        5
    fritx  
       Sep 7, 2014
    蛋疼 怎么 有 console.log(hello) 啊?
    location.js 里 helllo is not defined 啊
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3230 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 92ms · UTC 14:38 · PVG 22:38 · LAX 07:38 · JFK 10:38
    ♥ Do have faith in what you're doing.