Procházet zdrojové kódy

Add Unit Tests for format function.

tags/0.5.2-vsc
Sahab Yazdani před 14 roky
rodič
revize
0ed087d3e0
1 změnil soubory, kde provedl 20 přidání a 0 odebrání
  1. +20
    -0
      test/unit.js

+ 20
- 0
test/unit.js Zobrazit soubor

@@ -789,4 +789,24 @@ test("Regression Suite", function() {
)
, ' Hello '
, 'Change Delimiter + Partial');
});

test("Mustache.format", function() {
equals(
Mustache.format('{{0}} {{1}}, {{2}} {{3}}.', 'And', 'it', 'was', 'good'),
'And it, was good.',
'Simple Version'
);
equals(
Mustache.format('{{0}}', function() { return 'Groucho Marx'; } ),
'Groucho Marx',
'With Functions'
);
equals(
Mustache.format('{{0}}'),
'',
'Insufficient parameters (no failure)'
);
});

Načítá se…
Zrušit
Uložit