2013-07-26 1 views
3

Behat을 Zombie.js와 함께 사용하는 데 문제가 있으면 문제가 발생했습니다. 내가 지금 가지고있는 문제는 실제로 Zombie.js 모듈 내에 있습니다 (이전에는 오류가 둘 사이의 링크에있었습니다).Behat과 Mink가있는 Zombie.js

오류는 그렇게 보입니다.

[RuntimeException]                                 
    Server process has been terminated: (8) [                            
    url.js:107                                   
     throw new TypeError("Parameter 'url' must be a string, not " + typeof url)                  
      ^                                   
    TypeError: Parameter 'url' must be a string, not undefined                       
     at Url.parse (url.js:107:11)                              
     at urlParse (url.js:101:5)                              
     at Object.urlResolve [as resolve] (url.js:405:10)                         
     at History._resolve (/Users/nathanielh/www/website/node_modules/zombie/lib/zombie/history.coffee:201:20)           
     at History._assign (/Users/nathanielh/www/website/node_modules/zombie/lib/zombie/history.coffee:209:18)           
     at /Users/nathanielh/www/website/node_modules/zombie/lib/zombie/browser.coffee:326:30                
     at Browser.withOptions (/Users/nathanielh/www/website/node_modules/zombie/lib/zombie/browser.coffee:105:14)          
     at Browser.visit (/Users/nathanielh/www/website/node_modules/zombie/lib/zombie/browser.coffee:320:12)            
     at Socket.eval (eval at <anonymous> (/private/var/folders/fv/fp4xrfnx7kzfq2bqzywq5p9w00010f/T/mink_nodejs_serverSZBH0W:43:10), <anonymous>:2:9) 
     at Socket.<anonymous> (/private/var/folders/fv/fp4xrfnx7kzfq2bqzywq5p9w00010f/T/mink_nodejs_serverSZBH0W:43:5)         
    ]                                      

나는 history.coffee에서 resolve 기능이 존재하지 않는 배열 요소를 사용하려고하는 것으로 나타났습니다. @_stack[@_index] 참조 후 다음 에러를 일으키는 URL.resolve로 전달되고있는 정의로 확인되는지

// history.coffee 
    _resolve: (url)-> 
    if url 
     return URL.resolve(@_stack[@_index]?.url, url) 
    else # Yes, this could happen 
    return @_stack[@_index]?.url 

.

왜 이런 일이 발생하는지 알고 싶습니다. 내가 @_stack가 비어있는 것으로 나타났습니다

업데이트 및 @_index-1입니다. 이것은 가능하지 않아야합니다. 맞습니까?

+0

사용중인 nodej의 버전은 무엇입니까? –

답변

0

같은 문제 밍크/Behat/Symfony2.1

TypeError: Parameter 'url' must be a string, not object 
    at Url.parse (url.js:107:11) 
    at urlParse (url.js:101:5) 
    at Object.urlResolve [as resolve] (url.js:405:10) 
    at Object.iframe.setAttribute (/usr/lib/node_modules/zombie/lib/zombie/jsdom_patches.js:164:43) 
    at attrCopy (/usr/lib/node_modules/zombie/node_modules/jsdom/lib/jsdom/level1/core.js:331:14) 
    at Object.core.Node.cloneNode (/usr/lib/node_modules/zombie/node_modules/jsdom/lib/jsdom/level1/core.js:636:18) 
    at Object.core.Node.cloneNode (/usr/lib/node_modules/zombie/node_modules/jsdom/lib/jsdom/level1/core.js:706:37) 
    at Function.jQuery.extend.clone (/js/2225e47_jquery-1.8.2_2.js:6222:17) 
    at Function.jQuery.extend.parseHTML (/js/2225e47_jquery-1.8.2_2.js:501:31) 
    at jQuery.fn.jQuery.init (/js/2225e47_jquery-1.8.2_2.js:131:24) 
    at jQuery (/js/2225e47_jquery-1.8.2_2.js:44:10) 
    in /js/45a7194_jquery.jqModal_9.js 

노드 버전과 $ nodeElement-> mouseOver로()를 시뮬레이션하기 위해 노력하고 v0.10.15입니다. 아직도 대답을 파헤 치다.

1

좀비 드라이버가 노드 버전 0.8.24 (0.8.23이 작동 함)로 끊어집니다. 나는이 변화로 인해 믿습니다

2013.06.04, Version 0.8.24 (maintenance), c1a1ab067721ea17ef7b05ec5c68b17f05 

* url: Properly parse certain oddly formed urls (isaacs) 

유사한 변화 (같은 날에 만들어진이) 0.10.10에서 만든 것처럼 보인다 (내가 직접 커밋을 공부하지 적이 있지만).

2013.06.04, Version 0.10.10 (Stable), 25e51c396aa23018603baae2b1d9390f5d9db496 

* url: Properly parse certain oddly formed urls (isaacs) 

이 작업을 수행하려면 0.8.23 또는 0.10.9로 되 돌리는 것이 좋습니다. 아직 사용하고 있지 않다면 노드 설치를 관리하려면 nvm을 사용하는 것이 좋습니다.

관련 문제