Sean Wilkinson avatar Sean Wilkinson committed 4d7cf55

Added two tests for the `toString` prototype method

Comments (0)

Files changed (1)

test/quanah-spec.js

 //  part of an NPM-based workflow.
 //
 //                                                      ~~ (c) SRW, 17 Nov 2012
-//                                                  ~~ last updated 05 Dec 2012
+//                                                  ~~ last updated 12 Feb 2013
 
 (function () {
     'use strict';
         });
 
         it('should directly transform boolean literals', function (done) {
-            (true).Q(function (evt) {
+            true.Q(function (evt) {
              // This function needs documentation.
                 this.val = (this.val === true);
                 return evt.exit();
             return;
         });
 
+        describe('The `AVar.prototype.toString` method', function () {
+         // This function needs documentation.
+            var x;
+            beforeEach(function () {
+             // This function needs documentation.
+                x = avar();
+                return;
+            });
+            it('should propagate arguments for buffers', function () {
+                x.val = new Buffer('hello');
+                expect(x.toString('base64')).to.equal('aGVsbG8=');
+            });
+            it('should propagate arguments for numbers', function () {
+                x.val = 34;
+                expect(x.toString(8)).to.equal('42');
+            });
+            return;
+        });
+
         describe('The `when` method', function () {
          // This function needs documentation.
             var f, fa, when, x, xa, y, ya, z, za;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.