V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
TangMonk
V2EX  ›  Node.js

mocha 一个怪异的问题

  •  
  •   TangMonk · 2014-08-30 21:18:38 +08:00 · 2909 次点击
    这是一个创建于 3528 天前的主题,其中的信息可能已经有所发展或是发生改变。
    放代码不方便,我直接放 gif 了,很短。



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

    tag.js -> location.js

    location.js -> tag.js
    fritx
        5
    fritx  
       2014-09-07 09:25:07 +08:00
    蛋疼 怎么 有 console.log(hello) 啊?
    location.js 里 helllo is not defined 啊
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5869 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 02:01 · PVG 10:01 · LAX 19:01 · JFK 22:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.