ページ

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!


6 件のコメント:

  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. 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. 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

    返信削除

  4. Flipkart CashBack Offers June 2018 - SBI, HDFC, ICICI, Citibank Cards

    Best of Home Furnishing min 40% off:
    flipkart Mobile Accessories


    flipkart axis cashback offer,
    flipkart discount coupon codes, flipkartcashbackoffers,flipkart sbi cashback offers, flipkart cashback offers on mobiles,big billion day offers flipkart cashback, cashback offers flipkart, flipkart exchange offers on mobiles, flipkart cashback, flipkart cashback june,flipkart cashback offers, flipkart offers toady,flipkart bank cashback offer, flipkart cashback offers on watches, flipkart cashback offers on fashion, flipkart big billion day cashback offers, flipkart cashback may, flipkart big billion day offers 2017, flipkart deal of the day offers, flipkart christmas cashback offers, flipkart hdfc cashback, flipkart hdfc cashback offers, flipkart coupons, flipkart offers, flipkart offers cashback, flipkart offers 2017, flipkart axis bank offer, flipkart cashback february, flipkart cashback offers on washing, flipkart big billion day offers, flipkart hdfc cashback on electronics,flipkart offers on moblies, flipkartcashbackoffers, flipkart citi bank offers, flipkart cashback april, flipkart daily offers, flipkart yes cashback offer, flipkart today offers, flipkart discount offers on kitchen, flipkart cashback on home appliances, flipkart discount offers, flipkart deals today, flipkart cashback on mobiles, flipkart cashback offers on sarees, flipkart hdfc offer, flipkart cashback january, flipkart cashback offers on home, flipkart phonepe cashback offer, flipkart credit card offers, flipkart republic day sale offers, flipkart promo codes, flipkart cashback on refrigerators, flipkart upcoming offers in 2018, flipkart sbi offers, flipkart hdfc offer on mobiles,flipkart sbi offer cashback, flipkart debit card offers, flipkart phonepe offers, flipkart cashback coupons, flipkart citi bank offer, flipkart coupons 2018, flipkart citi bank offer on electronics, flipkart cashback on air conditioners, flipkart mobiles offers, flipkart iphone offers, flipkart hdfc bank offers, flipkart offers today, flipkart discounts on laptops flipkart exchange offers, flipkart sbi cashback offer, big trillion day offers flipkart ,flipkart citi bank cashback offers, flipkart cashback offers 2018, flipkart hdfc offers flipkart axis bank offers, flipkart air conditioner offers flipkart offers on televisions, flipkart refrogiratiors offers, flipkart sbi offer, flipkart daily deals, flipkart phonepe cashback offers, flipkart cashback offers, flipkart offers on laptops, flipkart new year cashback offers, flipkart emi offers, flipkart sbi offers on electronics


    flipkart cashback offers,cashbackcoupons,cashbackoffer,cashbackofferscoupons,flipkarthdfcoffer,
    MyDealsAndCoupons,flipkart cashback offers,cashbackcoupons,flipkartcashbackoffers,cashbackoffer,cashbackofferscoupons,flipkarthdfcoffer,latestcashbackoffers,flipkartcreditcardoffers,dealsncashbackcashbackoffers


    Flipkart CashBack Offers,telugu bloggers ,telugu websites
    Flipkart CashBack Offers - SBI, HDFC, ICICI, Citibank Cards,flipkart sbi debit card emi,flipkart upcoming offers on mobiles,flipkart credit card,flipkart cashback phonepe,flipkart credit card generator,flipkart cashback offer phonepe,flipkart american express,india fake debit card generator,flipkart american express gift card,sbi credit card offers on flipkart today,sbi flipkart offer,sbi debit card offers cash back,sbi flipkart offer 2018,,telugu bloggers ,telugu websites

    返信削除

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