From c2dd4523421c620da8fa8872bfc6719948710091 Mon Sep 17 00:00:00 2001 From: Kalervo Kujala Date: Sun, 13 Nov 2011 21:39:56 +0200 Subject: [PATCH] Create first unit test in Jasmine unit test framework. To run the unit test open pdf.js/test/unit/unit_test.html in your browser. This requires that https://github.com/pivotal/jasmine is cloned to the same directory level as pdf.js. --- test/unit/spec/obj_spec.js | 16 ++++++++++++ test/unit/unit_test.html | 51 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 test/unit/spec/obj_spec.js create mode 100644 test/unit/unit_test.html diff --git a/test/unit/spec/obj_spec.js b/test/unit/spec/obj_spec.js new file mode 100644 index 000000000..b79a21ed5 --- /dev/null +++ b/test/unit/spec/obj_spec.js @@ -0,0 +1,16 @@ +/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ + +'use strict'; + +describe("obj", function() { + + describe("Name", function() { + it("should retain the given name", function() { + var givenName = "My Name"; + var name = new Name(givenName); + expect(name.name).toEqual(givenName); + }); + }); +}); + diff --git a/test/unit/unit_test.html b/test/unit/unit_test.html new file mode 100644 index 000000000..cedd65c7a --- /dev/null +++ b/test/unit/unit_test.html @@ -0,0 +1,51 @@ + + + + pdf.js unit test + + + + + + + + + + + + + + + + + + +