From 1dd8bc078e222a090188f611241954ccb3a93883 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 6 Aug 2018 11:39:30 -0700 Subject: [PATCH] Delete typescript test We'll soon no longer have a great way to test this in the repository, but the support has effectively never regressed so far. Let's rely on user-facing bug reports for now and otherwise we can add this back in later if necessary. --- tests/all/main.rs | 1 - tests/all/typescript.rs | 79 ----------------------------------------- 2 files changed, 80 deletions(-) delete mode 100644 tests/all/typescript.rs diff --git a/tests/all/main.rs b/tests/all/main.rs index fecf2e1f..62a93435 100644 --- a/tests/all/main.rs +++ b/tests/all/main.rs @@ -5,4 +5,3 @@ extern crate wasm_bindgen_test_project_builder as project_builder; use project_builder::project; mod comments; -mod typescript; diff --git a/tests/all/typescript.rs b/tests/all/typescript.rs deleted file mode 100644 index 4de44694..00000000 --- a/tests/all/typescript.rs +++ /dev/null @@ -1,79 +0,0 @@ -use super::project; - -#[test] -fn works() { - project() - .webpack(true) - .file( - "src/lib.rs", - r#" - #![feature(use_extern_macros)] - - extern crate wasm_bindgen; - - use wasm_bindgen::prelude::*; - - #[wasm_bindgen] - pub fn foo() {} - - #[wasm_bindgen] - pub fn bar(a: &str, b: u32) -> String { - format!("{} {}", a, b) - } - - #[wasm_bindgen] - pub fn thunk(a: &JsValue) { - drop(a); - } - - #[wasm_bindgen] - pub struct A { - } - - #[wasm_bindgen] - impl A { - #[wasm_bindgen(constructor)] - pub fn new() -> A { - A {} - } - - pub fn new2() -> A { - A {} - } - - pub fn foo(&self) {} - - pub fn bar(&self, _a: u32) {} - - pub fn baz(&self, _d: &A) {} - } - "#, - ) - .file( - "test.ts", - r#" - import * as assert from 'assert'; - import { foo, bar, A, thunk } from './out'; - import { memory } from './out_bg'; - - export function test() { - foo(); - assert.strictEqual(bar('a', 3), 'a 3'); - - const x = new A(); - x.foo(); - x.free(); - - const y = A.new2(); - y.foo(); - y.bar(2); - y.baz(y); - y.free(); - - thunk(memory); - }; - "#, - ) - .test(); -} -