ページ

2010-12-26

Express と Expresso を使う際の注意点

12/26 現在 npm でリリースされている Express 1.0.0 と Expresso 0.7.0 を使う際の注意点です。

1つ目

コマンドラインで自動生成されるテストコードにバグがあります。

Express では、
$ mkdir foo
$ express foo
で、プロジェクトを自動生成できます。 /test に app.test.js というテストコードがあります。これは Expresso 用のテストコードですが、いまの Expresso では動きません。そこでテストコードを以下のように修正します。

修正その1

※ ちなみに このエクステンション を使うと gist の diff がとれます。便利すぎるのでおすすめです。

これでルートディレクトリから
$ expresso
を実行すると、テストが走ります。Github のコードは修正されているので、もうしばらく待っていたら解消すると思います。



2つ目

Expresso では -c でカバレッジを取ることができますが、 /lib 配下のコードにしか対応していません。そこで /lib をつくって app.js を移動します。

$ mkdir lib
$ mv app.js lib
外部ファイルのパスを修正します。


テストコードのパスも修正します。

修正その3

テストは expresso の引数でライブラリのパスを指定して実行します。

$ expresso -I lib -c

これでカバレッジも取れるようになりました。

最終的なソースコードはこうなっています。


以上、 Express と Expresso を使う際のちょっとした注意点でした。

Happy Noding!


10 件のコメント:

  1. Flipkart is Offering Cashback Offers Flipkart AXIS Cashback Offer You will get upto 75% Discount

    Flipkart is Offering Cashback Offers Flipkart YES Cashback Offer You will get upto 75% Discount

    Flipkart is Offering Cashback Offers Flipkart Phonepe Cashback Offer You will get upto 75% Discount

    Flipkart is Offering Cashback Offers Flipkart Cashback Offer You will get upto 75% Discount

    Flipkart is one of the biggest world wide eCommerce Site flipkart cashback offersso

    Flipkart is one of the biggest world wide eCommerce Site Flipkart hdfc offersso

    返信削除
  2. nice post.super article .iam follow your website.


    Flipkart CashBack Offers-SBI, HDFC, ICICI, Citibank Cards&Flipkart HDFC Cards Offers"
    flipkart bank offers,flipkart cash back coupons,flipkart offers 2018,flipkart coupons 2018,flipkart cashback offers 2018,flipkart cashback offers,flipkart cash back offers,flipkart cashback coupons,flipkart cashback,Flipkart Cashback Offers,Flipkart Bank Offers,Flipkart Deals 2018, flipkart upcoming offers on mobiles, hdfc credit card offers on flipkart 2018 flipkart sbi offer big billion day, flipkart hdfc offer, flipkart hdfc offer august 2018 sbi flipkart offer 2018 flipkart icici offer


    FLIPKART CITIBANK OFFER,FLIPKART ICICI OFFER,
    SBI CARD OFFERS ON FLIPKART,
    FLIPKART CASHBACK OFFER TODAY,FLIPKART CREDIT CARD OFFERS,
    ALL BANK CREDIT CARD OFFERS,HDFC CREDIT CARD OFFERS ON FLIPKART,
    AXIS BANK CREDIT CARD OFFERS ON FLIPKART,
    CITIBANK CREDIT CARD OFFERS ON FLIPKART,SBI FLIPKART OFFER



    Flipkart Cashback Offers||Flipkart Bank Offers||Flipkart Deals 2018||flipkart upcoming offers,"
    "Flipkart Cashback Offers || Flipkart Bank Offers || Flipkart Deals 2018 ||" "flipkart upcoming offers on mobiles, hdfc credit card offers on flipkart 2018, sbi credit card offers on flipkart today, flipkart hdfc offer terms and conditions, sbi flipkart offer 2018, flipkart cashback phonepe, flipkart hdfc offer august 2018, flipkart icici offer

    flipkart is Offering Cashback Offers Flipkart hdfc cashback offers You will get upto 75% Discount

    Flipkart is Offering Cashback Offers Flipkart SBI Cashback Offer You will get upto 75% Discount

    Flipkart is Offering Cashback Offers Flipkart AXIS Cashback Offer You will get upto 75% Discount

    Flipkart is Offering Cashback Offers Flipkart YES Cashback Offer You will get upto 75% Discount

    Flipkart is one of the biggest world wide eCommerce Site so here you will getFlipkart big billion day offers

    Flipkart is one of the biggest world wide eCommerce Site so here you will getflipkart bank cashback offersso


    Flipkart cashback offers on mobiles,
    Flipkart cashback offers,
    Flipkart cashback coupons,
    Flipkart upcoming offers on mobiles,
    Flipkart HDFC cashback offers,
    Flipkart SBI cashback offers,
    Flipkart AXIS cashback offers,
    Flipkart Citibank cashback offers,
    Flipkart cashback on mobiles,
    Flipkart cashback offers today,
    Flipkart big billion day cashback offers,
    Flipkart big billion days cashback offers,
    big billion day cashback offers,
    Flipkart big billion days offers,
    flipkart cashback on mobiles,
    flipkart citibank offer,
    sbi credit card offers on flipkart today,
    flipkart upcoming offers on mobiles,
    hdfc credit card offers on flipkart,
    flipkart upcoming big billion day,
    flipkart upcoming sale,
    sbi credit card offers on mobiles,
    flipkart offers today,
    flipkart offers on mobiles,
    flipkart offers today mobile phones,
    flipkart cashback offers,
    flipkart cashback coupons,
    flipkart sale today offer,
    flipkart cashback offers today,
    cashback offers,
    flipkart cashback offer today

    返信削除
  3. Thanks for sharing, nice post! Post really provice useful information!

    Hương Lâm chuyên cung cấp bán máy photocopy và dịch vụ cho thuê máy photocopy giá rẻ, uy tín TP.HCM với dòng máy photocopy toshiba và dòng máy photocopy ricoh uy tín, giá rẻ.

    返信削除

  4. flipkart sale diwali
    flipkart offer diwali
    diwali sale flipkart
    flipkart diwali offer
    flipkart diwali sale offer
    happy diwali offer
    diwali dhamaka flipkart
    flipkart navratri offer
    diwali dhamaka offers flipkart
    flipkart dasara offers
    diwali big offer
    flipkart online shopping diwali offers
    diwali offer mobile
    diwali offer for mobile
    deepavali offer
    flipkart sale diwali offer
    diwali offer date
    flipkart diwali offer mobile
    upcoming diwali offers on mobiles
    diwali offers for mobiles in flipkart
    mobile phone offer for diwali
    diwali offer mobile phone
    mobile phones diwali offer
    diwali mobile offers
    big diwali sale flipkart
    flipkart big diwali sale
    flipkart mobile offer diwali
    snapdeal diwali offer
    deepavali offer mobile
    diwali lights flipkart
    electric kettle flipkart
    diwali dhamaka sale
    diwali offer mobile price
    flipkart diwali lights
    diwali mobile offer
    big bazaar offer diwali
    deepavali offer mobile price
    best diwali offer in online shopping
    best diwali offers
    macbook air flipkart
    mi dhamaka sale club
    diwali online sale
    diwali offer new mobile
    diwali offers big bazaar
    deepavali offer mobile phones
    deepali offer
    best diwali sale
    dinner set flipkart
    diwali offer mobile mi
    diwali shopping offer
    diwali best offer mobile phone
    diwali discount on mobiles
    dinner set online flipkart
    best diwali mobile offer
    flipkart gst sales offer
    diwali sale mobile phones
    snapdeal diwali offers on mobiles
    online mobile diwali offers
    best diwali sale online
    diwali offer shopping sites
    diwali dhamaka mobile offer
    big diwali sale
    diwali special offer for mobiles
    diwali best offer online
    diwali festival offers online shopping
    flipkart diwali gifts
    diwali sale mobile
    online shopping diwali festival offers
    best diwali offer mobile phone
    diwali festival mobile offers
    deepawali offer mobile phone
    diwali offer online india
    diwali special offer mobile
    flipkart kettle
    diwali special online shopping
    all mobile diwali offer
    diwali offer on online shopping sites
    diwali offers for tv
    flipkart macbook pro
    diwali dhamaka mobile
    washing machine exchange offer snapdeal
    mobile diwali offer price
    diwali discount mobile phones
    best diwali deals
    led fans flipkart
    last deepavali date
    flipkart diwali offers on led tv
    iphone diwali offer
    big bazaar diwali gifts
    flipkart pre gst sale fake
    bajaj electric kettle flipkart
    amazon exchange offer pin code list
    deepawali offers
    flipkart festive dhamaka days
    fan exchange offers
    laptop price diwali offer
    when diwali started
    diwali dhamaka in mobile
    led diwali offer
    diwali offers today
    mi note cover flipkart
    lenovo diwali offers
    snapdeal diwali gifts

    返信削除

  5. flipkart upcoming sale
    flipkart sale next
    next flipkart sale
    upcoming sale on flipkart
    up coming flipkart sale
    flipkart offer day
    offer flipkart
    flipkart sales date
    online sale upcoming
    upcoming sales online
    flipkart upcoming offers
    upcoming sales
    up coming sale
    flipkart diwali sale
    flipkart offer upcoming
    upcoming sale
    flipkart offer date
    big billion day next
    next offer on flipkart
    flipkart sales
    sale on flipkart
    flipkart next big billion day
    flipkart next sale date
    flipkart offers date
    flipkart upcoming sale date
    flipkart next offer
    flipkart next big sale
    when is flipkart sale
    next offer on flipkart
    flipkart christmas sale
    sales coming up
    upcoming sale in flipkart
    upcoming mobile sale
    next big sale on flipkart
    flipkart christmas offer
    flipkart next flash sale
    upcoming online sales india
    upcoming flipkart sale date
    next sale in flipkart
    flipkart sell date
    flipkart coming sale
    next sale of flipkart
    flipkart bigsale
    upcoming mobile offers
    upcoming sales on amazon and flipkart
    flipkart sale upcoming
    flipkart next sale offer
    upcoming offers on online shopping
    flipkart offer sale date
    flipkart deal day
    flipkart mega sale
    flipkart offer new year
    flipkart mobile sale date
    flipkart upcoming deal
    flipkart next offer date
    flipkart next offer sale
    upcoming sale of flipkart
    upcoming online shopping offers
    flipkart sale offer date
    upcoming offers on mobiles
    flipkart upcoming mobile offers
    upcoming sales on amazon and flipkart
    flipkart upcoming bank offer
    upcoming offer
    upcoming sales flipkart
    flipkart anniversary date
    flipkart coming soon offer
    flipkart diwali offer date
    next flipkart sale date
    christmas sales flipkart
    flipkart great indian sale
    flipkart electronic sale
    flipkart flash sale date
    flipkart sale december
    upcoming electronic sale
    flipkart upcoming big billion day
    flipkart next big billion day sale
    flipkart diwali sale date
    flipkart big sale date
    offer sale in flipkart
    sale online flipkart
    flipkart december sale
    flipkart new year sale
    deals at flipkart
    flipkart next electronic sale
    upcoming mobile sale online
    upcoming flash sale on flipkart
    flipkart biggest sale date
    flipkart upcoming offers date
    flipkart diwali sale date
    sale date on flipkart
    flipkart next discount sale
    flipkart next offer sale date
    flipkart offer time
    online shopping offer date
    upcoming online offers
    flipkart maha sale
    flipkart offers of the day
    big billion days date
    flipkart festive sale
    next flipkart offer
    next sale on flipkart and amazon
    upcoming laptop sale
    flipkart upcoming mobile sale
    flipkart offer day list
    next flash sale on flipkart
    upcoming flipkart big billion day
    flipkart upcoming offer dates
    flipkart offers list
    flipkart new sale date
    flipkart future offers
    online upcoming sale
    flipkart sale start date
    flipkart upcoming mobile
    online sale date
    flipkart end of season sale
    upcoming sales flipkart
    flipkart mega sale date
    next sell on amazon and flipkart
    sell of flipkart

    返信削除
  6. このコメントは投稿者によって削除されました。

    返信削除
  7. I like the gainful knowledge you give in your articles. I'll bookmark your site and check again here habitually. You did a great job and i am very happy to see this because it is very useful for me. Thanks for sharing.We provide best services Ecommerce Website Development Dubai for your digital product.

    返信削除
  8. SEO Expert


    Dubai First Seo is an SEO company in Dubai. Muhammad A.K.A SEO Expert in Dubai is leading this company and is involved directly in every SEO project & is quite excited to work on yours.

    SEO Expert

    返信削除

  • HOME
  • ABOUT
このページの先頭へ